diff Lib/idlelib/PyShell.py @ 77173:a2877fbabf95 3.2

Issue #10365: File open dialog now works instead of crashing even when parent window is closed. Patch by Roger Serwy.
author Terry Jan Reedy <tjreedy@udel.edu>
date Sat, 26 May 2012 20:23:45 -0400
parents a95b19b3b4cd
children 9d0c3a835bfe 21862628a013
line wrap: on
line diff
--- a/Lib/idlelib/PyShell.py	Sat May 26 16:31:00 2012 -0400
+++ b/Lib/idlelib/PyShell.py	Sat May 26 20:23:45 2012 -0400
@@ -1435,7 +1435,8 @@
     if tkversionwarning:
         shell.interp.runcommand(''.join(("print('", tkversionwarning, "')")))
 
-    root.mainloop()
+    while flist.inversedict:  # keep IDLE running while files are open.
+        root.mainloop()
     root.destroy()
 
 if __name__ == "__main__":