Fencer wrote:
Scott
David Daniels wrote:
To be a trifle more explicit, turn:
...
if __name__ == '__main__':
main()
into:
...
if __name__ == '__main__':
try:
main()
except Exception, why:
print 'Failed:', why
Scott David Daniels wrote:
To be a trifle more explicit, turn:
...
if __name__ == '__main__':
main()
into:
...
if __name__ == '__main__':
try:
main()
except Exception, why:
print 'Failed:', why
import sys,
Tomasz Zieliński wrote:
On 7 Cze, 14:49, Fencer wrote:
My question is how can I trap
errors encountered by the interpreter (if that is the right way to put
it) in order to keep the console window open so one has a chance to see
the error message?
Interpreter errors are same beasts as exceptio
2009/6/7 Fencer
> Anyway, I wrote a few lines of code and when I first tried to run it by
> double-clicking the .py-file the console window still disappeared right
> away. So, in order to see what was happening, I ran it from a shell and it
> turned out to be a missing import. My question is how
On 7 Cze, 14:49, Fencer wrote:
> My question is how can I trap
> errors encountered by the interpreter (if that is the right way to put
> it) in order to keep the console window open so one has a chance to see
> the error message?
>
Interpreter errors are same beasts as exceptions,
so you can try
Hello, I need to write a simple utility program that will be used under
Windows. I want to write the utility in python and it will be run by
double-clicking the the .py-file.
I put a raw_input('Press enter to exit) at the end so the console window
wouldn't just disappear when the program is fi