summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorRoger Serwy <roger.serwy@gmail.com>2013-06-12 03:13:51 (GMT)
committerRoger Serwy <roger.serwy@gmail.com>2013-06-12 03:13:51 (GMT)
commitc2efeb61b9b11137654810067b8beca393e6ff08 (patch)
tree0d9a1bc9e2e5371b5f4b468f7191976052f18981 /Lib/idlelib/PyShell.py
parent982c6efeb55a59bebb43ef6ac1d8e969105e8dd1 (diff)
parent036e84924a0e0bdcc3c17033ea0263a3462825e1 (diff)
downloadcpython-c2efeb61b9b11137654810067b8beca393e6ff08.zip
cpython-c2efeb61b9b11137654810067b8beca393e6ff08.tar.gz
cpython-c2efeb61b9b11137654810067b8beca393e6ff08.tar.bz2
#5492: merge with 3.3
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index 4e19226..d8a5cd2 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -367,6 +367,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
self.port = PORT
self.original_compiler_flags = self.compile.compiler.flags
+ _afterid = None
rpcclt = None
rpcsubproc = None
@@ -486,6 +487,8 @@ class ModifiedInterpreter(InteractiveInterpreter):
threading.Thread(target=self.__request_interrupt).start()
def kill_subprocess(self):
+ if self._afterid is not None:
+ self.tkconsole.text.after_cancel(self._afterid)
try:
self.rpcclt.listening_sock.close()
except AttributeError: # no socket
@@ -561,8 +564,8 @@ class ModifiedInterpreter(InteractiveInterpreter):
pass
# Reschedule myself
if not self.tkconsole.closing:
- self.tkconsole.text.after(self.tkconsole.pollinterval,
- self.poll_subprocess)
+ self._afterid = self.tkconsole.text.after(
+ self.tkconsole.pollinterval, self.poll_subprocess)
debugger = None
@@ -973,10 +976,6 @@ class PyShell(OutputWindow):
self.stop_readline()
self.canceled = True
self.closing = True
- # Wait for poll_subprocess() rescheduling to stop
- self.text.after(2 * self.pollinterval, self.close2)
-
- def close2(self):
return EditorWindow.close(self)
def _close(self):