[pypy-svn] r9151 - pypy/dist/pypy/interpreter
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Sat Feb 12 09:03:12 CET 2005
Author: sanxiyn
Date: Sat Feb 12 09:03:12 2005
New Revision: 9151
Modified:
pypy/dist/pypy/interpreter/main.py
Log:
Put __main__ at sys.modules
Modified: pypy/dist/pypy/interpreter/main.py
==============================================================================
--- pypy/dist/pypy/interpreter/main.py (original)
+++ pypy/dist/pypy/interpreter/main.py Sat Feb 12 09:03:12 2005
@@ -18,7 +18,10 @@
w = space.wrap
w_code = compile(source, filename, cmd, 0, 0)
- mainmodule = module.Module(space, space.wrap("__main__"))
+ w_main = space.wrap('__main__')
+ mainmodule = module.Module(space, w_main)
+ space.setitem(space.sys.w_modules, w_main, mainmodule)
+
w_globals = mainmodule.w_dict
pycode = space.interpclass_w(w_code)
More information about the Pypy-commit
mailing list