summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/PyShell.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2012-05-27 00:33:32 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2012-05-27 00:33:32 (GMT)
commiteaa7e7825e9f4b211bc104cfde6cc951f9dcb94e (patch)
tree752a64ab668341f85f10fb2ace95a4b293e18b2b /Lib/idlelib/PyShell.py
parent42f7b7ecb2cd2e0c3d62315f033639b2ad8bacd9 (diff)
downloadcpython-eaa7e7825e9f4b211bc104cfde6cc951f9dcb94e.zip
cpython-eaa7e7825e9f4b211bc104cfde6cc951f9dcb94e.tar.gz
cpython-eaa7e7825e9f4b211bc104cfde6cc951f9dcb94e.tar.bz2
Issue #10365: File open dialog now works instead of crashing
even when parent window is closed. Patch by Roger Serwy.
Diffstat (limited to 'Lib/idlelib/PyShell.py')
-rw-r--r--Lib/idlelib/PyShell.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index eeb33e1..eec0b70 100644
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1458,7 +1458,8 @@ def main():
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__":