[Idle-dev] Fix for long delays

Tal Einat taleinat at gmail.com
Tue May 27 21:07:54 CEST 2008

Douglas S. Blank wrote:
> On Mon, May 26, 2008 8:51 am, Tal Einat said:
>> Douglas S. Blank wrote:
>>> 2) when starting IDLE, check for a running version, and have it open the
>>> file/use the current Python Shell. That would prevent starting multiple
>>> shells which are trying to do the same thing (ie, connect on to serial
>>> ports, etc).
>>> 3) allow idle to have multiple shells (in case you really do want to do
>>> that)
>> Hmm. I must say I don't really see the benefit here if you allow
>> multiple shells - you'd still have the same problems that you have
>> now. And if you only allow one shell, that's very restrictive - I'm
>> pretty sure we don't want to do that.
> There are two issues here: whether you want two shells, and how you start
> IDLE. Currently, starting IDLE with a right-click and selecting "Edit with
> IDLE" automatically gives you a new process that can't use the previous
> shell. I'd suggest separating these two issues by having #2 and #3.
>> I can understand why in your specific case you would want #2 - you
>> want to ensure that there is only one IDLE shell. However, you're the
>> first I've ever heard wanting this from IDLE, whereas I know plenty of
>> users who often run multiple IDLE shells in parallel.
> I'm not arguing against running multiple IDLE shells in parallel... I'm
> suggesting that that is not always want the student wants, but that is the
> default behavior (from the OS window---of course you can get around this
> by opening the programs from inside IDLE. But new users don't understand
> this distinction). I'd like to make the default be the same IDLE running,
> and then one can control the multiple shells from there.

That could be done, but it would require a major refactoring. IDLE is
currently implemented with the idea of a single shell hard-coded
throughout the code. For instance, IDLE's completion uses the shell's
namespace to figure out possible completions. If there would be
multiple shells, which one's namespace should be used? In which one
would files be executed when you used Run Module (F5)? Also,
implementing and maintaining a cross-platform method of having files
opened in the same process could be difficult.

To be clear -- I think this is a good idea, and I can understand the
importance for teaching. I too have had learners stumble over these
issues. I just think that it needs to be thought through and may
require a lot of work. Hopefully with more support we can make things
like this happen.

- Tal

More information about the IDLE-dev mailing list