Code run from IDLE but not via double-clicking on its *.py
mensanator at aol.com
mensanator at aol.com
Tue Aug 30 11:10:00 EDT 2005
n00m wrote:
> When I double-click on "some.py" file console window appears just for a
> moment and right after that it's closed. If this script is started from
> inside of IDLE (F5 key) then it executes as it should be (e.g.
> executing all its print statements).
>
> Any ideas? OS: Windows; Python 2.3.4. Thanks.
Your console window closes when the program terminates.
And no, you won't necessarily see any of your print statements
before the window closed. They were buffered and the window
closed before they could be displayed.
Start a console window manually. From the command prompt,
type
some.py
or
python some.py
More information about the Python-list
mailing list