0

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.

2
Contributors
2
Replies
3
Views
11 Years
Discussion Span
Last Post by shanenin
0

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')
0

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 :-)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.