Roger Serwy added the comment:

I found the root cause of the original error. 

Entering "exit()" at the shell raises SystemExit which gets written to the 
shell's text widget. The call to actually write the text passes through 
.write() in Lib/idlelib/OutputWindow.py, which calls text.update(). The call to 
.update() enters the Tk event loop and flushes pending events, including 
expired .after callbacks. 

Forcing the .after callback in .close() to 1 ms will always trigger the error. 
Commenting out the text.update() in OutputWindow.py avoids the error.

The patch causes .kill_subprocess() to execute immediately which prevents the 
subprocess from writing to sys.stderr.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5492>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to