Running a script in windows
Chris Gonnerman
chris.gonnerman at newcenturycomputers.net
Thu Dec 27 09:00:19 EST 2001
> On Thu, 27 Dec 2001 20:51:49 +0900, Jonathan Gardner
> <jgardn at alumni.washington.edu> wrote:
>
> I know this comes up a lot, but I can't seem to find the answer in
> the archives. (If the answer is RTFM, please let me know where.)
>
> I don't have a windows box on my desk. A friend of mine does, but I
> can't get to it. He is trying to run a program I wrote, but the
> error message is coming up too fast for him to catch it. How can
> you keep that error message window around longer in Win2K? (BTW,
> let's pretend he doesn't know how to use the DOS prompt.)
>
> Jonathan
Rewrite your script like this:
import sys
try:
# your script body goes here
except:
import traceback
traceback.print_exc(file=sys.stderr)
raw_input()
Hope this helps.
More information about the Python-list
mailing list