[Tutor] Re: from prompt to file in windows

alan.gauld@bt.com alan.gauld@bt.com
Tue, 4 Sep 2001 17:28:25 +0100


> Yes Kumud, on Windows the best shell for Python straight out
> of the download is IDLE, a graphical shell.  

Depends. If you got the ActiveState Python you might 
prefer Pythonwin - but it's for Windows only. The folding 
editor features of Pythonwin are a powerful inducement :-)
(You also get Pythonwin if you install the winall package)

> You go File | New Window and write your Python code there.  

This is the important bit for IDLE or Pythonwin.
Don't try to save the session from the Python >>> prompt
(you can but then need to edit out all the '>>>' bits 
and the responses. I sometimes do this if prototyping 
at the prompt... its faster than retyping it all!

> IDLE has limitations in that Tkinter programs

Pythonwin does strange things with Tkinter too.
Which is really weird since its not a Tk app!

> IDLE over using any DOS box shell.  Your program is automatically
> color coded and so forth.  You can get other editors that do this, 
> but IDLE is more than an editor, it's a shell, so you can execute 
> an expression directly, as you would in the DOS shell.

The advantage of the editor/DOS box approach is that you 
can be sure that the running program does exactly what it 
will when you run it for real. In IDLE etc you can never 
be quite certain it'll be the same.

(Incidentally the Pythonwin editor is available as a 
 standalone app - Scite I recommend it as an alternative 
 to vim for Windows users.)

Alan G
(Who likes IDLE too but felt the opposition deserved a plug :-)