Windows/DOS: double clicking a .py file
just at xs4all.nl
Mon Sep 9 18:46:54 EDT 2002
> > impossible to actually see the exception... Is there a way
> > to keep the dos prompt window in this case?
> Try something like the following... We've had much success with
> automatically emailing the traceback back to the developer using the
> cgitb module -- you can never trust users to give you good error reports
> <wink> besides the cgitb module provides much more context than the
> standard exceptions... Let me know if you'd like the code...
> your code here
> import msvcrt, traceback
> traceback.print exc()
> print 'Hit a key to exit'
> while not msvcrt.kbhit():
Ah, that looks like a good trick, I will try that.
Thanks for your code offer, but in most cases I will have to ask for the
input data anyway, so a simple traceback is good enough for now.
More information about the Python-list