火曜日, 6月 09, 2009

Keeping console window open

Keeping console window open


...
if __name__ == '__main__':
main()

into:
...
if __name__ == '__main__':
try:
main()
except Exception, why:
print 'Failed:', why
import sys, traceback
traceback.print_tb(sys.exc_info()[2])
raw_input('Leaving: ')

0 件のコメント: