It's a smart idea to capture and re-elevate KeyboardInterrupts, so that you can nevertheless eliminate This system applying Ctrl-C. Logging is outside the scope with the problem, but a fantastic choice is logging. Documentation for that sys and traceback modules. This query is inside a collective: a subcommunity described by https://natural-bookmark.com/story20133211/the-5-second-trick-for-find-weed-in-southampton