[Edu-sig] comments on Idle and Python

Toby Donaldson tjd at sfu.ca
Wed Dec 8 03:22:05 CET 2004


With this discussion about what editor to use for Python education, I 
thought I'd share some of the issues that have come up with Idle. I am 
curious if other people have the same or similar issues with Idle.  This 
is based on a  semester-long first-year university level programming 
course in Python, with about 200 people in my classes (about 400 overall).

Overall, Idle was pretty good and we plan to use it again. But there are 
some confusing defaults that confused a number of students and made 
their first experiences a little more confusing than necessary.

   - The File menu is confusing because the first choice is to open a 
"New Window". Is this a shell window or a file window? The difference 
between the shell and a file is not obvious to most beginners. Better 
would be "New File", or "Start New Python File" even.

   - Syntax coloring only happens if you save your file as a '.py' file. 
Unfortunately, by default, Idle does *not* save new files as a .py 
files. Thus many students ending up files that run fine, but lack 
syntax-coloring. So, Idle should either save all files as .py by 
default, or syntax-coloring should be turned on by default.

   - The default behavior when press F5 ('run') is to prompt you if you 
want to save a file. I have never seen anyone *not* want to save their 
file in this situation, so the more useful default would be to 
automatically save the file before it is run.

   - There is no "..." when you enter  a multi-line shell command, e.g. 
Idle prints this

      >>> for i in range(10):
                   <--- cursor sits here blinking

      The problem is that is nearly the same behavior as when you run a 
function that doesn't return (e.g. due to an infinite loop).
      So it would be helpful if Idle set sys.ps2 to '...' by default.

Toby



More information about the Edu-sig mailing list