From: Guido van Rossum Date: Fri, 14 Jun 2002 13:54:26 +0000 (+0000) Subject: Use code.interact(), which is even simpler, *and* imports readline X-Git-Tag: v2.3c1~5309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da07ea72826b6b3b9249d664d1c22a10eefe5460;p=python Use code.interact(), which is even simpler, *and* imports readline when it can. --- diff --git a/Lib/rexec.py b/Lib/rexec.py index b45fc69917..674e1932fa 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: