> I'd like the window to stick around if there are any exceptions > raised. I tried to put all my code in function main() and use > > try: > main() > except None: > raise > else: > print "Press RETURN to exit..." > sys.stdin.readline() > > No dice: the window closes even if main() raises an exception. > Any idea how to do it?
Try this: try: main() except: import traceback print "The script crashed:" traceback.print_exc() print "Press RETURN to exit..." sys.stdin.readline() Trent -- Trent Mick trentm at activestate.com _______________________________________________ ActivePython mailing list ActivePython@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython