[Idle-dev] Leaving subprocesses hanging
John Zelle
john.zelle at wartburg.edu
Thu Dec 16 18:25:23 CET 2004
Hello all,
I'm new to the idle-dev list, but felt I needed to post here for some
assistance. I am in communication with a number of college faculty using
Python to teach introductory programming courses. There has been growing
frustration that newer versions of IDLE seem to be less stable. In
particular, especially under Windows XP, there are times when IDLE
becomes unresponsive (hangs). This seems to be related to losing proper
communication with its subprocess. The only way to get things cleaned up
again is to go into the process manager and kill the stray pythonw
processes. Unfortunately, the behavior is sporadic and hard to pin down.
I did a little poking around in the idle-dev archives and did not see
anything about this problem, so I did a bit of experimenting on my own.
One simple case that causes IDLE to hang is to simply close the shell
while the program that it is executing is waiting for input. After IDLE
asks if it should kill the program, it usually hangs. If it doesn't do
this the first time, a couple of <f5>-close sequences will produce it.
I modified PyShell.py in IDLE 1.03 by adding a call to cancel_callback()
before closing the shell window. This seems to solve the problem
(perhaps in an inelegant way). I do not know yet if fixing this
"special" case solves the larger instability problems. I'm hoping some
of the reader of edu-sig are trying it out and will let me know.
In the mean time, I'd appreciate hearing if this is a known problem that
is being worked on in IDLE. My preliminary test of IDLE 1.1 shows that
it still suffers from the specific hang that I've identified.
--John
More information about the IDLE-dev
mailing list