Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r59144:f3626f6833ff
Date: 2012-11-29 16:08 -0800
http://bitbucket.org/pypy/pypy/changeset/f3626f6833ff/

Log:    don't lose the cmd line script's filename

diff --git a/pypy/translator/goal/app_main.py b/pypy/translator/goal/app_main.py
--- a/pypy/translator/goal/app_main.py
+++ b/pypy/translator/goal/app_main.py
@@ -639,7 +639,7 @@
                     def execfile(filename, namespace):
                         with open(filename) as f:
                             code = f.read()
-                        exec_(code, namespace)
+                        exec_(compile(code, filename, 'exec'), namespace)
                     args = (execfile, filename, mainmodule.__dict__)
             success = run_toplevel(*args)
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to