Permalink
Browse files

Make sys.modules['__main__'] work as expected.

  • Loading branch information...
bdarnell committed May 29, 2011
1 parent 86c12df commit 3d4de5ec1038260ad9b17248adc76eb369abf33c
Showing with 1 addition and 1 deletion.
  1. +1 −1 auto2to3.py
View
@@ -94,7 +94,7 @@ def main():
if not PACKAGES and not DIRS:
DIRS.append(os.getcwd())
sys.argv[1:] = rest
- runpy.run_module(args.main, run_name='__main__')
+ runpy.run_module(args.main, run_name='__main__', alter_sys=True)
if __name__ == '__main__':
main()

0 comments on commit 3d4de5e

Please sign in to comment.