Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try to exec file first, then code #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

try to exec file first, then code #3

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 20, 2017

No description provided.

@ghost ghost changed the title try file first, then code try to exec file first, then code Oct 20, 2017
@@ -45,6 +45,8 @@ class Tracer:
def run(self, code, run_globals=None):
sys.settrace(self.trace_dispatch)
try:
exec(compile(open(code, "rb").read(), code, 'exec'), globals())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably wanna close this file

@raylu
Copy link
Owner

raylu commented Oct 20, 2017

I don't think this will work out that well in general. if your file has any import statements, the first 100 frames are just plumbing through import machinery, for example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant