Enable use of threads with tkinter
tkthread - Enable threads to interact with tkinter
Tk (in Python, tkinter) is not thread-safe. It's not possible to interact with a tkinter UI from a thread other than the one in which it is running its event loop.
There are a number of workarounds, but they generally boil down to doing some sort of polling, which either introduces delays, or is wasteful of CPU resource.
This package provides a 'bridge' between threads and tkinter that does not suffer from either of these problems; threads can run freely, and can schedule operations to be performed on a tkinter UI. Those operations will be picked up with minimal delay and executed asynchronously with the threads, but without incurring any polling cost.
The examples provided demonstrate the difference in CPU cost between a 'polling' solution and the one provided by this package.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for rjgtoys_tkthread-0.0.1-py3-none-any.whl