[Idle-dev] multiprocessing module and IDLE without subprocess
clockworksaint at gmail.com
Mon Dec 1 12:32:59 CET 2008
On Mon, Dec 1, 2008 at 7:13 AM, Tal Einat <taleinat at gmail.com> wrote:
> Well, the nice thing about IDLE is that it is implemented in pure Python.
> This means you don't have to compile at all to make changes; just edit
> IDLE's code and run it.
Yep, I just figured that I should start with the version in trunk so
that the resultant patches would be most useful. Building was a
smoother than I expected, but I had to copy TK/TCL DLLs into the
working directory to get "import _tkinter" to work, and I'm not
entirely sure why.
> IDLE's code is found under the Lib/idlelib directory where your Python
> library files are found. Under Windows this is found where you installed
> Python (C:\Python26 by default for Python2.6).
> When working on IDLE it is useful to run it from the command line so you can
> see exception output etc. On windows, open a command prompt and run:
> C:\Python26\python.exe C:\Python26\Lib\idlelib\idle.py
Thanks! I made the changes and it seems to work, and I'll see about
making up a patch tonight. As I noted before, in order to get the port
number, I need to bind the socket before spawning the subprocess, and
the comments lead me to believe that this means that the subprocess
will also inherit the socket. However, it seems that this happens
*anyway* when you restart the subprocess, so I imagine it's not a
particularly bad thing. Or is it only bad if the socket is in the
"listening" state at the time you spawn the subprocess?
I'm also curious why IDLE uses sockets to communicate with the
subprocess in the first place. Are other forms of IPC not suitable?
More information about the IDLE-dev