summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 12a45a4..5790483 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -478,9 +478,6 @@ class ModifiedInterpreter(InteractiveInterpreter):
import sys as _sys
_sys.path = %r
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,))
active_seq = None
@@ -514,7 +511,10 @@ class ModifiedInterpreter(InteractiveInterpreter):
print >>sys.__stderr__, errmsg, what
print >>console, errmsg, what
# we received a response to the currently active seq number:
- self.tkconsole.endexecuting()
+ try:
+ self.tkconsole.endexecuting()
+ except AttributeError: # shell may have closed
+ pass
# Reschedule myself
if not self.tkconsole.closing:
self.tkconsole.text.after(self.tkconsole.pollinterval,
@@ -730,7 +730,10 @@ class ModifiedInterpreter(InteractiveInterpreter):
self.tkconsole.endexecuting()
finally:
if not use_subprocess:
- self.tkconsole.endexecuting()
+ try:
+ self.tkconsole.endexecuting()
+ except AttributeError: # shell may have closed
+ pass
def write(self, s):
"Override base class method"
@@ -804,9 +807,6 @@ class PyShell(OutputWindow):
#
OutputWindow.__init__(self, flist, None, None)
#
- import __builtin__
- __builtin__.quit = __builtin__.exit = "To exit, type Ctrl-D."
- #
## self.config(usetabs=1, indentwidth=8, context_use_ps1=1)
self.usetabs = True
# indentwidth must be 8 when using tabs. See note in EditorWindow: