]> granicus.if.org Git - python/commitdiff
Use code.interact(), which is even simpler, *and* imports readline
authorGuido van Rossum <guido@python.org>
Fri, 14 Jun 2002 13:54:26 +0000 (13:54 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 14 Jun 2002 13:54:26 +0000 (13:54 +0000)
when it can.

Lib/rexec.py

index b45fc699174777065484fecc5b8054ec4dc57f01..674e1932fa5cee06715631916e8013620219e945 100644 (file)
@@ -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: