Skip to content

Commit

Permalink
Set __name__ correctly when executing files
Browse files Browse the repository at this point in the history
  • Loading branch information
jstasiak committed Oct 9, 2014
1 parent 6825291 commit 81e51df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -10,7 +10,7 @@ def read(fname):

setup(
name="statprof-smarkets",
version="0.2.0c2",
version="0.2.0c3",
author="Smarkets",
author_email="support@smarkets.com",
description="Statistical profiling for Python",
Expand Down
2 changes: 1 addition & 1 deletion statprof.py
Expand Up @@ -501,7 +501,7 @@ def _runscript(filename):
})
with open(filename) as f:
content = f.read()
exec_(content)
exec_(content, globals(), {'__name__': '__main__'})


def main():
Expand Down

0 comments on commit 81e51df

Please sign in to comment.