[Tutor] running a script from IDLE
alan.gauld@bt.com
alan.gauld@bt.com
Fri, 8 Mar 2002 17:42:59 -0000
> >On Thu, 7 Mar 2002, Ron Nixon wrote:
> > > IDLE that I've saved. When > I copy to file into IDLE and
> > > hit "run script" I get a messege saying "The buffer for
> > > Python Shell is not saved. Please save it first."
Nobody seems to have caught this bit yet...
You are trying to paste your code into the Python Shell
window - it has the >>> prompt in it. You shouldn't do that.
Instead you need to start IDLE, then do File | New to
open a new blank window.
Paste your program into that window.
Then do File|Save As to save the program as a file ending .py.
Finally use Edit|Run to run the program, the output will be
in the original Python Shell window.
Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld