[Idle-dev] Guilherme Polo changes lost?

Terry Reedy tjreedy at udel.edu
Mon Sep 16 03:29:45 CEST 2013


On 9/15/2013 12:06 PM, Bruce Sherwood wrote:
> In a conversation with Terry Reedy, it became evident that I need to
> explain the issue of lost capabilities less cryptically. There are
> several different issues.
>
> (1) Ruth Chabay and I have had the opportunity to watch very large
> numbers of students using VPython in our intro physics curriculum. These
> engineering and science students come to our course with no previous
> experience with programming. With IDLE it was common for them to be
> quite confused and puzzled when their program stopped, simply because
> their (overly?) large edit window covered up the shell window where the
> error was displayed. Polo implemented a change that brings the shell
> window forward when there is an error message, in front of other
> windows. This is important.

The reason I did not understand what you were asking for is that this 
was *not* lost. Rather, on my machine, the Shell Window is brought to 
the top immediately when a file is run, to present print output, error 
messages, and to receive input either for input() or >>> commands.

If you tested this and experienced different, please give detail as I 
would consider it a bug.

> (2) Entering statements interactively in the shell encourages
> experimentation. The same experimentation should be available for
> running whole programs, but in IDLE this is awkward because of the
> requirement to save the file somewhere before running.

With autosave, I experience no awkwardness at all. I have a file 
'tem.py' in a miscellaneaous files directory that I use for 
experimentation. I open it from Recent Files, check to see if I want to 
save or select all and delete, and proceed with edit-run-edit-run... .

An instructor could set up a system with one or more scratch files like 
this. I can imagine writing a little script to create one or more empty 
files and add them to the saved files list.

> Polo implemented
> changes that let you configure IDLE so that you can start the editor,

with New File, at least the first time.

> type a short program, and press F5 to run it without the interruption of
> having to decide where to save the file.

I do not know what he did but the easiest way to do this would be to 
save 'Untitled' somewhere. After Idle is closed and reopened, one would 
have to either re-open Untitled from Recent Files or click OK on the 
"File exists! Overwrite?" box. I would rather do the former, which means 
learning to use Recent Files anyway. People who do not know how to use 
Save As and Recent Files should learn, as both are common to current 
Windows app that create files.

> If you have not experienced
> this, you might object that it's no big deal to have to save the file
> first, but in fact it is a surprisingly big deal because it breaks the
> flow of your thought.

I agree, which is why I think Autosave should be the default, or if not, 
there should be a setup dialog for the first Idle installation.

> In Polo's implementation, there are three "Run (F5) Preferences" that
> replace the "Autosave Preferences" in IDLE:
>
> If file has never been saved: Prompt to Save or No prompt
> If file has been saved before: Prompt to Save or No prompt (this is
> equivalent to current IDLE)

This is too much complication for little if any gain.

> On first error: Bring shell forward or Do nothing

This would be a regression from current behavior.

> If you choose both No prompt options and experiment with a new
> (temporary) file, upon exit you are warned that the file has never been
> saved and offered the option to save at that point if you wish.
>
> One can argue over what the default settings should be, though
> presumably one default is noncontroversial, namely that an error should
> bring the shell forward.

Perhaps I should mention that I have experienced enough data loss due to 
crashes and freeze-ups that I considered having the programs written to 
disk before running them a *feature*. If anything, I would like to make 
saving more versions easier, and have a timed backups, or backups with 
each no-error run.

-- 
Terry Jan Reedy



More information about the IDLE-dev mailing list