python/dist/src/Lib/idlelib NEWS.txt, 1.23.4.8, 1.23.4.9 PyShell.py, 1.81.4.4, 1.81.4.5
Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13532 Modified Files: Tag: release23-maint NEWS.txt PyShell.py Log Message: The GUI was hanging if the shell window was closed while a raw_input() was pending. Restored the quit() of the readline() mainloop(). http://mail.python.org/pipermail/idle-dev/2004-December/002307.html M NEWS.txt M PyShell.py Index: NEWS.txt =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/NEWS.txt,v retrieving revision 1.23.4.8 retrieving revision 1.23.4.9 diff -u -d -r1.23.4.8 -r1.23.4.9 --- NEWS.txt 6 Jun 2004 17:41:41 -0000 1.23.4.8 +++ NEWS.txt 23 Dec 2004 04:26:55 -0000 1.23.4.9 @@ -1,7 +1,11 @@ What's New in IDLE 1.0.4? ========================= -*Release date: XX-XXX-2004* +*Release date: XX-Dec-2004* + +- The GUI was hanging if the shell window was closed while a raw_input() + was pending. Restored the quit() of the readline() mainloop(). + http://mail.python.org/pipermail/idle-dev/2004-December/002307.html - Added a Tk error dialog to run.py inform the user if the subprocess can't connect to the user GUI process. Added a timeout to the GUI's listening Index: PyShell.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/idlelib/PyShell.py,v retrieving revision 1.81.4.4 retrieving revision 1.81.4.5 diff -u -d -r1.81.4.4 -r1.81.4.5 --- PyShell.py 22 Sep 2004 04:52:33 -0000 1.81.4.4 +++ PyShell.py 23 Dec 2004 04:26:55 -0000 1.81.4.5 @@ -877,6 +877,9 @@ parent=self.text) if response == False: return "cancel" + if self.reading: + self.top.quit() + self.canceled = True self.closing = True # Wait for poll_subprocess() rescheduling to stop self.text.after(2 * self.pollinterval, self.close2) @@ -941,10 +944,12 @@ save = self.reading try: self.reading = 1 - self.top.mainloop() + self.top.mainloop() # nested mainloop() finally: self.reading = save line = self.text.get("iomark", "end-1c") + if len(line) == 0: # may be EOF if we quit our mainloop with Ctrl-C + line = "\n" if isinstance(line, unicode): import IOBinding try: @@ -954,10 +959,11 @@ self.resetoutput() if self.canceled: self.canceled = 0 - raise KeyboardInterrupt + if not use_subprocess: + raise KeyboardInterrupt if self.endoffile: self.endoffile = 0 - return "" + line = "" return line def isatty(self): @@ -976,13 +982,13 @@ return "break" self.endoffile = 0 self.canceled = 1 - if self.reading: - self.top.quit() - elif (self.executing and self.interp.rpcclt): + if (self.executing and self.interp.rpcclt): if self.interp.getdebugger(): self.interp.restart_subprocess() else: self.interp.interrupt_subprocess() + if self.reading: + self.top.quit() # exit the nested mainloop() in readline() return "break" def eof_callback(self, event):
participants (1)
-
kbk@users.sourceforge.net