mirror of
https://github.com/python/cpython.git
synced 2025-10-13 10:23:28 +00:00
Use code.interact(), which is even simpler, *and* imports readline
when it can.
This commit is contained in:
parent
cb4d7ce7cb
commit
da07ea7282
1 changed files with 3 additions and 3 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue