How to not enable a user to close the root tkinter window

Nicholas Cannon nicholascannon1 at
Mon Sep 22 13:43:51 CEST 2014

I have a project I am working on( which grabs info from the internet then displays it on the screen. It is a multithreaded program so as the function that retrieves the data from the internet there is also another function running in parallel which updates a ttk loading bar. Pretty simple multi threaded stuff. But I found out that the user can close the window whilst the threads are running which generates an error and is not healthy. Is there a way I can make the root tkinter window not close whilst the threads are running. I did this with the search bar and search button. Or can I safely stop the running threads and make them drop everything error free? Any help will be apreciated!

More information about the Python-list mailing list