Apr-17-2023, 02:23 PM
tkinter is single threaded. You cannot execute tkinter code in a thread that did not call tkinter.Tk(). You can have tkinter events start threads to do work in parallel, but those threads cannot interact with tkinter widgets. For example, you cannot have a button click start a thread that appends strings to a text box.
The way to get around this restriction is use queues or some other type of signaling device to pass information from the background thread to the tkinter thread. I did this with a couple of class variables in this example:
https://python-forum.io/thread-39656-pos...#pid168425
The way to get around this restriction is use queues or some other type of signaling device to pass information from the background thread to the tkinter thread. I did this with a couple of class variables in this example:
https://python-forum.io/thread-39656-pos...#pid168425