[Idle-dev] IDLE interpreter window

David Scherer dscherer@evergames.kssacct.com
Tue, 07 Mar 2000 10:12:16 -0500


> Though I myself still have some questions with doing this at all; I'd like
> to see my program output appear in some fresh window, 

The output from "run script" should definitely go to a separate window from
the shell.  In particular, we would like to disable the shell by default,
but we still need to see standard output!  There are also different design
goals for a pure output window and a shell window.

> and cleared each time I execute the program.

I think the output window *should* remember the results of successive runs,
but they should be clearly delimited.  A good compromise would be to scroll
the output window at the beginning of each run so that the first output line
of that run is at the top:

Output of run n-2

Output of run n-1

------------------- top of window
Output of run n

That way you can scroll back to see previous results, but you won't be
confused by them.

> Also a paned view would be nice here -- I want the output window to be
> always there, in the location I want to. I don't want a new output window
> to appear each time I run something.

Agreed.  Creating a new window for each run requires the user to play a
frustrating game of "whack-a-mole" with the output windows.  We are fighting
this problem with our graphics library (which must pop up one or more
*extra* windows under the program's control).

> A seperate issue is that Idle seems to remember old module states when I
> run the same script again, with some code changed. Perhaps this is good if
> you want to interact with your modules from the shell, but for me it got
very
> confusing.  Idle kept giving traceback containing errors which I already
> had corrected in the sources! I ended up giving up and ran my program from
> the command line instead.

This is an artefact of the way Idle runs programs in its own interpreter. 
Once a module is imported, it stays imported until you explicitly reload it,
even across multiple runs.

Moving to a model where the user program executes in a separate process
addresses this and many other problems.

Dave