I have been doing most all of my python programming in a linux bash shell. I mean I run all of my scripts from a bash shell. If my script produces an error(hardly ever happens :-), the error is outputted to the shell, so I am able to fix it.

when I run a script on windows if it errors, the window just closes, so i do not know what the error is. Is their a way to keep the window open to see where my script went wrong?


edit added later//

I have been writing my scripts in notepad2(need to install dr python) and saving them as filename.py. then I run them by clicking on the script.

Running your script from an IDE like IDLE or DrPython will keep the display window open for the errors to show up.

You might try to add a time.sleep(10) at the end. I think there is way to pipe the error messages to a file too.

import sys
sys.stderr = file('C:/temp/error.txt', 'w')

thanks, running it from dr python works nice. The only issue I have with using dr python on windows is the small font. Their must be an option to change it, but I can't seem to find it.

edit added later//

I found it under edit text styles :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.