On 15 Mar 2012 04:14, "bob gailer" <[email protected]> wrote:
>
> On 3/14/2012 12:12 PM, Tamar Osher wrote:
>> I can run a python program in Notepad++, but what happens is that the
black box flashes and disappears immediately, so that I never see the
results.
>>
>> How can I style it so that the results of the program stay on the
computer screen, for me to see?
>
> Do this:
>
> try:
> # your program goes here
> finally:
> raw_input("Press any key")
> # if you are running Python 3 replace raw_input with input
>
> Adding the try-finally construct ensures that any exception in your code
will be visible.
>
Alternatively, invoke python to run your program at the prompt with the
interactive switch:
python -i myscript.py
Best,
Brian vdB
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor