[Idle-dev] Deprecate running IDLE without a subprocess

Tal Einat taleinat at gmail.com
Sun Jun 24 12:32:11 CEST 2012


On Tue, Jun 12, 2012 at 2:54 AM, serwy <roger.serwy at gmail.com> wrote:

> IDLE developers,
>
> In the interest of simplifying IDLE's code, I suggest that running IDLE
> *without* a subprocess  be deprecated. Since 2009, IDLE could have multiple
> instances running while using a subprocess. See http://bugs.python.org/**
> issue1529142 <http://bugs.python.org/issue1529142>
>
> Running without a subprocess has a flaw in that Ctrl+C from the IDLE GUI
> can not be used to stop a program. This can be irritating to Python
> beginners if an accidental infinite loop arises and the user's only
> recourse is to restart IDLE, losing any unsaved work in the editor windows.
>
> What are your thoughts?
>

IIRC, the major reason for keeping around no-subprocess mode was because
IDLE always used the same port for communicating with its subprocess.
Therefore, running more than one instance of IDLE at the same time would
never work, and even closing IDLE and running it again quickly would
sometimes fail. This is no longer an issue since IDLE now uses a random
port given by the OS (by opening the socket on TCP port zero - it took me
years to discover that trick!).

Other reasons for keeping no-subprocess mode around:
* debugging IDLE is significantly easier when everything is in a single
process
* some firewall software would occasionally block the connection to the
subprocess, or perhaps just raise a warning (but I guess this is no longer
a real issue; the old firewall warning message has been removed)

In my opinion, if the IDLE developers are confident in their ability to
debug IDLE running with a sub-process, then there is no significant reason
not to remove the no-subprocess mode. From what I remember about the code,
this would allow simplifying things significantly in many places.

- Tal Einat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/idle-dev/attachments/20120624/cadbffd3/attachment.html>


More information about the IDLE-dev mailing list