[Edu-sig] Using IDLE with students

John Zelle john.zelle at wartburg.edu
Fri Aug 17 00:41:11 CEST 2007

On Thursday 16 August 2007 8:01 am, Andy Judkis wrote:
> > 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.

This is why I prefer the new IDLE running in the standard (not -n mode). It 
really is much better to keep the running script isolated in a subprocess.


> 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.

This is also certainly true. Getting my simple graphics package (graphics.py) 
to play nicely with IDLE was a pain, and it has really taken on hit on 
efficiency as a result. I am thinking of reverting to a non-threaded version, 
but that would require IDLE to be run with the -n switch. Of course, the 
problem I'm running into now is that many folks are running IDLE with -n, and 
my graphics package does not run well in that mode (although an older version 
that I still make available runs quite well).

Another alternative is to use IDLE for as a development environment but do use 
a regular python session from a command prompt for doing interactive noodling 
around with packages that also run under Tk. There's just no good way around 
the "deuling event loops" problem in Tk (at least not on Windows, Linux is 
less of a problem).


John M. Zelle, Ph.D.             Wartburg College
Professor of Computer Science    Waverly, IA     
john.zelle at wartburg.edu          (319) 352-8360  

More information about the Edu-sig mailing list