It is really a smart idea to capture and re-elevate KeyboardInterrupts, so as to continue to kill the program making use of Ctrl-C. Logging is outdoors the scope on the concern, but a fantastic possibility is logging. Documentation for the sys and traceback modules. Sourcing our have solutions and remedies https://helpmehigh.com/