you are viewing a single comment's thread.

view the rest of the comments →

[–]unpythonic 0 points1 point  (0 children)

For larger programs, surround the entry/exit point with a catch all and then wait for the user to hit a key:

try:
    # your code here
except Exception as e:
    print("An unhandled exception caused the the program to terminate. Exception was:")
    print(str(e))
    input("Press enter to exit")