Alan is right. According to section 3.5.2 of "Learning Python, 2nd
Edition", by David Ascher and Mark Lutz:
Run scripts from text edit windows, not the interactive window. To
run
a file of code under IDLE, always select the Edit/RunScript menu
option from within the text edit window where you are editing the
code
to be run-not from within the main interactive window where the >>>
prompt appears. The RunScript option should arguably not be
available
in the interactive window at all (and in fact seems to have
disappeared in the recent release); if you select it there, you'll
wind up trying to run a log of your interactive session, with less
than desirable results!
Regards,
Barry
>Date: Wed, 5 Oct 2005 10:44:09 +0100
>From: "Alan Gauld" <[EMAIL PROTECTED]>
>Subject: Re: [Tutor] FW: Help Needed
>To: "Daniel Watkins" <[EMAIL PROTECTED]>, <[email protected]>
>Message-ID: <[EMAIL PROTECTED]>
>Content-Type: text/plain; format=flowed; charset="UTF-8";
> reply-type=original
>
>> When I am in Python Shell of the IDLE GUI, when I click Edit/Run
>
>You shouldn't be running scripts when in the shell, it executes them
>immediately.
>You use edit/run when working in a script file window.
>
>HTH,
>
>Alan G
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor