Roger Serwy <roger.se...@gmail.com> added the comment: William's explanation in msg123203 for the cause of the error and the solution for keeping a reference to "flist" is good. IDLE has only one instance of FileList while running anyways.
Attached is a patch that behaves like William's description. The modification to PyShell.py is necessary for a corner-case. If the last IDLE window is closed with the Open File dialog still open, then FileList.py and WindowList.py both call .quit(). Without the modification, IDLE closes after selecting a file since root.mainloop() returns and root.destroy() gets executed. The alternative (and simpler) method is to have the Open File dialog be modal, but AFAIK it can't be set to modal. ---------- nosy: +serwy Added file: http://bugs.python.org/file23957/issue10365_rev2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10365> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com