summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-06-14 13:54:26 (GMT)
committerGuido van Rossum <guido@python.org>2002-06-14 13:54:26 (GMT)
commitda07ea72826b6b3b9249d664d1c22a10eefe5460 (patch)
treef31f24c5e4e5d79be443406e4e9b4c5f07d6eca3
parentcb4d7ce7cb2baacd458f7d02e9c12a7aebb828a9 (diff)
downloadcpython-da07ea72826b6b3b9249d664d1c22a10eefe5460.zip
cpython-da07ea72826b6b3b9249d664d1c22a10eefe5460.tar.gz
cpython-da07ea72826b6b3b9249d664d1c22a10eefe5460.tar.bz2
Use code.interact(), which is even simpler, *and* imports readline
when it can.
-rw-r--r--Lib/rexec.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/rexec.py b/Lib/rexec.py
index b45fc69..674e193 100644
--- a/Lib/rexec.py
+++ b/Lib/rexec.py
@@ -553,12 +553,12 @@ def test():
return 1
if fp.isatty():
import code
- interp = code.InteractiveConsole(r.modules['__main__'].__dict__)
try:
- interp.interact(
+ code.interact(
"*** RESTRICTED *** Python %s on %s\n"
'Type "help", "copyright", "credits" or "license" '
- "for more information." % (sys.version, sys.platform))
+ "for more information." % (sys.version, sys.platform),
+ local=r.modules['__main__'].__dict__)
except SystemExit, n:
return n
else: