[Idle-dev] Fix for long delays

David Scherer dscherertemp at gmail.com
Tue May 27 04:03:17 CEST 2008

Bruce: Thanks for correcting my earlier posting error!  The problem with
loading IDLE from the shell context menu is that the default binding runs
IDLE with the "no subprocess" command line option (you can see this in the
output window if you look, and you can correct it by changing the command
line for the "Edit" action in explorer by hand).  My guess is that this is
because of some real or perceived problem with running multiple instances of
IDLE in the usual subprocess mode.  I think it would be a good idea to
remove the "no subprocess" option from the shell binding, and fix any
problem with the coexistence of multiple subprocess-based IDLE instances.


Your use of IDLE, like ours, required some similar changes. Perhaps Dave
> can list out, point by point, the changes the patch makes, and we can
> discuss those?

The patch is really very simple: when IDLE wants to terminate the
subprocess, it uses the most direct and powerful command available from the
operating system to do it, instead of asking the subprocess to terminate
itself in a relatively unreliable way.  This is the most straightforward,
easy, efficient and elegant way to do the job.  The only reason it's more
than a couple of lines of code is because Python provides slightly different
interfaces to do this on UNIX and Windows (reflecting the slightly different
operating system APIs).

I'd be in favor of IDLE instantly killing the shell on exit, and for
> making it generally more useful for VPython (and for us). In fact, I'm
> going to try the patch tonight to see if it would work for our uses too.
> Perhaps we can get rid of our hacks in favor of a general solution. (I
> think that Tal incorporated a version of F5 that only reloaded the module
> and didn't restart the shell. But I just downloaded Python2.5 for Windows
> and see that IDLE is still version 1.2.2 :( )

Restarting the shell is essential for us: it's impossible to reliably return
a program to its initial state by any other method.  It's one of the major
advantages of the subprocess model.

Please let us know how my patch works for you!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/idle-dev/attachments/20080526/0bf658c6/attachment.htm>

More information about the IDLE-dev mailing list