Recipe 16-1. How to Update a Progress Bar from a Thread
Problem
If you use GUIs (graphical user interfaces)
in Python much, you know that every now and then you need to execute some long-running process. Of course, if you do that as you would with a command-line program, then you’ll be in for a surprise. In most cases, you’ll end up blocking your GUI’s event loop and the user will see your program freeze. This is true of all the Python GUI toolkits, including Tkinter, PyQt, or wxPython. What can you do to get around such mishaps? Start the task in another thread or process, of course! In this ...