[Tkinter-discuss] Proposal for thread-safe Tkinter

Allen Taylor Allen.Taylor at mdacorporation.com
Fri Oct 24 19:56:50 CEST 2008

Please find mtTkinter, a thread-safe version of Tkinter, at http://tkinter.unpythonic.net/wiki/mtTkinter. If you find it useful, or if you find bugs, please let me know.

>>> "Ron Longo" <ron.longo at cox.net> 2008-10-23 21:31 >>>
Sounds like you have a great module there which many people could benefit from.  I would recommend you post your module to the tkinter wiki (http://tkinter.unpythonic.net/wiki/).  You may also consider packaging it up and posting it to the python package index.

----- Original Message ----- 
From: Allen Taylor ( mailto:Allen.Taylor at mdacorporation.com ) 
To: Tkinter-discuss at python.org 
Sent: Thursday, October 23, 2008 4:16 PM
Subject: [Tkinter-discuss] Proposal for thread-safe Tkinter

I was given the task of upgrading a Python/Tkinter GUI application to the latest versions of Python and Tk. After a while, I realized that the application had not been written in a thread-safe manner. Multiple threads would simply use the Tk object directly. The application apparently ran fine (i.e., didn't crash!) using older versions of Python (2.2) and Tk (8.3), but it started to have serious problems (i.e., crashing) after using the latest versions.
The problem is that there isn't enough budget to fix the whole application. So, I invested a bit of time to develop mtTkinter, a thread-safe version of Tkinter. Importing mtTkinter actually modifies the original Tkinter in such a way to make it thread-safe, recognizing and diverting out-of-thread calls to the Tk object creation thread via a queue and an 'after' event. I think it works quite well, requiring basically no changes to the application other than to import mtTkinter instead of (or in addition to) Tkinter. Even packages that use Tkinter (e.g., Pmw) benefit.
I would like to contribute this module (single file, about 160 lines) to the Python community, but I don't know how. I'm new to Python and am not initiated in the deep Pythonic developer world. Can someone give me some pointers? Many thanks.
Allen B. Taylor
9445 Airport Road
Brampton, ON  L6S 4J3
905-790-2800 ext. 4350
allen.taylor at mdacorporation.com 

Tkinter-discuss mailing list
Tkinter-discuss at python.org 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20081024/6e51c77f/attachment.htm>

More information about the Tkinter-discuss mailing list