Message187857
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. |
|
Date |
User |
Action |
Args |
2013-04-26 14:25:03 | roger.serwy | set | recipients:
+ roger.serwy, terry.reedy, Todd.Rovito, serhiy.storchaka, Guilherme.Simões |
2013-04-26 14:25:03 | roger.serwy | set | messageid: <1366986303.85.0.70731476773.issue17838@psf.upfronthosting.co.za> |
2013-04-26 14:25:03 | roger.serwy | link | issue17838 messages |
2013-04-26 14:25:03 | roger.serwy | create | |
|