[Edu-sig] Using IDLE with students

Andy Judkis ajudkis at verizon.net
Thu Aug 16 15:01:26 CEST 2007


> When teaching Python to beginners and using IDLE, it seems that one of the
> dangers would be to have them assigning variables in the interactive mode
> and then maybe using them in a script they're writing.  Then, when they 
> run
> the script, the variable is still in memory so the program works--for now.

I run into this a lot, and I find that it's very very difficult to explain 
what's going on to kids who are just getting their feet wet.

> Provided you start IDLE in the "normal" mode, running scripts should 
> execute
> in a separate subprocess, so the kinds of interactions you describe here 
> are
> not really a problem. When running in this mode, you can also do a 
> "restart"
> under the shell menu, and this will get you a fresh interactive 
> environment.
>
> The problem is that the default IDLE setup in some environments starts up 
> IDLE
> with the -n switch that causes it to run without separate subprocesses for
> scripts. For example, under Windows, if you right-click on a Python 
> program
> and then select "edit with IDLE" it will open in the no-subprocess mode. I
> always have my students create a shortcut to IDLE in their working
> directories and make sure it starts IDLE without the -n switch, and I
> emphasize starting IDLE and then loading programs.

The problem that I run into is that the livewires graphics package doesn't 
behave properly unless the -n is used.  Here's a link with some background: 
http://mail.python.org/pipermail/edu-sig/2005-November/005583.html
I think I've run into other packages that also have problems but livewires 
is the one I'm sure about.  This has been a real problem for me.

Andy



More information about the Edu-sig mailing list