mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
SF 693333
Modify subprocess to print a reasonable message upon receiving a 'quit' or 'exit'
This commit is contained in:
parent
fd8e6e5990
commit
b2487335bf
1 changed files with 3 additions and 0 deletions
|
@ -418,6 +418,9 @@ class ModifiedInterpreter(InteractiveInterpreter):
|
||||||
import sys as _sys
|
import sys as _sys
|
||||||
_sys.path = %s
|
_sys.path = %s
|
||||||
del _sys
|
del _sys
|
||||||
|
_msg = 'Use File/Exit or your end-of-file key to quit IDLE'
|
||||||
|
__builtins__.quit = __builtins__.exit = _msg
|
||||||
|
del _msg
|
||||||
\n""" % `sys.path`)
|
\n""" % `sys.path`)
|
||||||
|
|
||||||
active_seq = None
|
active_seq = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue