Idle won't start - Update

Kurt B. Kaiser kbk at shore.net
Sat Mar 20 23:00:00 CET 2004


David MacQuigg <dmq at gain.com> writes:

> With the Task Manager, I see about 8 pythonw.exe processes running!!
> I killed them all.  Now things seem back to normal.

That's the right thing to do.

>
> The only thing I can think of that has been unusual in the last few
>days is that I have been running IDLE simultaneously with Python from
>the command line, 

This should not be a problem.  I do it all the time.

>and doing some testing in both windows of computations involving
>illegal floating-point numbers ( inf and nan ).  This does not cause
>a crash, or anything beyond the usual traceback in python.
>
> I noticed that when I start Python from a command line, I get one
> process (python.exe) in the Task Manager.  When I start Python using
> IDLE, I get two processes (both named pythonw.exe).

Often you get three.  The GUI, the subprocess mainthread, and the
subprocess socket_thread.  On Unix, you get two.

> I tried starting and closing multiple copies of IDLE.  

Now this you don't want to do.  Right now IDLE uses one port to
communicate with the subprocess and only one instance of IDLE with
subprocess is allowed.  In the future IDLE will be enhanced to allow
multiple instances with subprocess.

You can run as many IDLE instances with the -n switch as you like in
parallel with the single instance of IDLE with subprocess.

>This seems to leave some zombie 'pythonw.exe' processes still alive.

Yes, they are trying to connect to the GUI.

If you write code which causes the subprocess to block,
e.g. sleep(999) and then restart the shell, you will see a zombie left
behind.  In 999 seconds it should disappear.  But it is possible to
write code which blocks forever.  On Unix, a restart also sends a
SIGKILL to the subprocess, which takes care of the zombies, but that
isn't available on Windows.

>Another strange phenomenon - I always get two more 'pythonw.exe'
>processes with each start of IDLE, but sometimes I get an extra
>window, and sometimes not.  Closing the extra windows leaves one more
>'pythonw.exe' than when I started, so they do accumulate.

A couple of months ago improvements were made to the robustness of the
subprocess communication.  If you can use the current CVS, you may get
better results and I'd be interested in hearing about any further
problems.

I'm away for a bit, so I can't follow up immediately.
-- 
KBK



More information about the Python-list mailing list