[pypy-svn] r4985 - pypy/branch/src-newobjectmodel/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Sat Jun 5 18:06:34 CEST 2004
Author: arigo
Date: Sat Jun 5 18:06:33 2004
New Revision: 4985
Modified:
pypy/branch/src-newobjectmodel/pypy/interpreter/interactive.py
Log:
Provide the app-level variables with a 'w_' prefix in the interp-level
console.
Modified: pypy/branch/src-newobjectmodel/pypy/interpreter/interactive.py
==============================================================================
--- pypy/branch/src-newobjectmodel/pypy/interpreter/interactive.py (original)
+++ pypy/branch/src-newobjectmodel/pypy/interpreter/interactive.py Sat Jun 5 18:06:33 2004
@@ -35,7 +35,11 @@
print
banner = ("Python %s on %s\n" % (sys.version, sys.platform) +
"*** Entering interpreter-level console ***")
- code.interact(banner=banner, local=self.__dict__.copy())
+ local = self.__dict__.copy()
+ for w_name in self.space.unpackiterable(self.w_globals):
+ local['w_' + self.space.unwrap(w_name)] = (
+ self.space.getitem(self.w_globals, w_name))
+ code.interact(banner=banner, local=local)
print '*** Leaving interpreter-level console ***'
raise
More information about the Pypy-commit
mailing list