Roger Serwy added the comment:

If we remove .close() then we'll need to then have an alternative way to allow 
"exit()" and "quit()" to actually close IDLE. The RPC proxy already transfers 
exceptions between the subprocess and the front-end, so we could catch the 
SystemExit exception and handle it by calling close(). That's perfectably 
doable, and likely the right way to do it. If anyone wants to write that patch, 
I'll gladly offer guidance if necessary.

Here's a dirty hack that also solves the issue. Garbage collection on the 
PseudoInputFile for sys.stdin calls .close(). As long as we hold an extra 
reference to it, it won't close. The attached patch holds an extra reference to 
sys.stdin in Lib/idlelib/run.py.

----------
keywords: +patch
Added file: http://bugs.python.org/file30027/hold_stdin.patch

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

Reply via email to