PDA

View Full Version : Handling shutdown signal in Python



hamiljf
August 28th, 2014, 11:37 PM
One can only set a signal handler in the main thread in Python. However, tkinter grabs the main thread. Is there any experience on the best way to program this. I'm planning to set the SIGTERM handler in the main thread and then start tkinter on the assumption that the mainloop() will be interrupted. Testing may be a bit tricky.