[Tutor] The IDLE subprocess

Luke Paireepinart rabidpoobear at gmail.com
Sun Apr 29 19:36:26 CEST 2007


Alan Gilfoy wrote:
> Often, when I am developing code, I get an error message saying that  
> "IDLE's subprocess can't make connection"
>
> Sometimes this happends when I have IDLE open, and am about to hit F5  
> to run a program-in-process.
> Sometimes it happens when I opne up IDLE the first time.
>
> It's often fixed on restart of the program, not even restart of the computer.
>
> A big deal or not?
> And what does the subprocess do, anyway?
>   
This usually happens when you run a python script that doesn't terminate 
correctly.
So it seems like it exits, but if you go to the task manager, you can 
see an extra pythonw.exe process still running.
Terminating it should fix everything.
(I assume you're on Windows, because I don't think this problem would 
arise on Linux, but if it did, I expect the solution to be similar.)

It's not a big deal.
The subprocess runs your python program as a separate process of IDLE, 
so that when your program blocks for input, for example,
IDLE won't block also. So you can see all your output and such.  It's 
especially useful to run in subprocess mode when you're
editing Pygame windows, because if they crash without subprocess, you 
have to terminate Pygame as well as IDLE.
(again, assuming you're on Windows, because on Linux I think it just 
opens in subprocess mode all the time,
whereas on Windows if you right-click something and choose "edit with 
idle" it doesn't open in subprocess mode.)



More information about the Tutor mailing list