stackoverflow.com: how to exit the entire application from a Python thread? pythondocs.python.org: thread.interrupt_main() pythonstackoverflow.com: why does sys.exit() not exit when called inside a thread in Python? python