It is really a good idea to capture and re-elevate KeyboardInterrupts, so as to still kill the program making use of Ctrl-C. Logging is outside the house the scope of the question, but a very good possibility is logging. Documentation for your sys and traceback modules. You need the traceback https://helpmehigh.com/