On 3/14/2012 12:12 PM, Tamar Osher wrote:
Hi.  I ask for help.  Thanks very much for your time.

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.
If you expected anything else you don't understand how windows runs programs.
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.

--
Bob Gailer
919-636-4239
Chapel Hill NC

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to