<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.2900.5626" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>All,</DIV>
<DIV>Please find mtTkinter, a thread-safe version of Tkinter, at <A href="http://tkinter.unpythonic.net/wiki/mtTkinter">http://tkinter.unpythonic.net/wiki/mtTkinter</A>. If you find it useful, or if you find bugs, please let me know.</DIV>
<DIV>Enjoy!</DIV>
<DIV>Allen<BR><BR>&gt;&gt;&gt; "Ron Longo" &lt;ron.longo@cox.net&gt; 2008-10-23 21:31 &gt;&gt;&gt;<BR></DIV>
<DIV><FONT face=Arial>Allen,</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>Sounds like you have a great module there which many people could benefit from.&nbsp; I would recommend you post your module to the tkinter wiki (<A href="http://tkinter.unpythonic.net/wiki/">http://tkinter.unpythonic.net/wiki/</A>).&nbsp; You may also consider packaging it up and posting it to the python package index.</FONT></DIV>
<DIV><FONT face=Arial></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial>Thanks,</FONT></DIV>
<DIV><FONT face=Arial>Ron</FONT></DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> <A title=Allen.Taylor@mdacorporation.com href="mailto:Allen.Taylor@mdacorporation.com">Allen Taylor</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=Tkinter-discuss@python.org href="mailto:Tkinter-discuss@python.org">Tkinter-discuss@python.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, October 23, 2008 4:16 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Tkinter-discuss] Proposal for thread-safe Tkinter</DIV>
<DIV><BR></DIV>
<DIV>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&nbsp;problems (i.e., crashing) after using the latest versions.</DIV>
<DIV>&nbsp;</DIV>
<DIV>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&nbsp;to)&nbsp;Tkinter. Even packages that use Tkinter (e.g., Pmw) benefit.</DIV>
<DIV>&nbsp;</DIV>
<DIV>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.</DIV>
<DIV>&nbsp;</DIV>Allen B. Taylor<BR>MDA<BR>9445 Airport Road<BR>Brampton, ON&nbsp; L6S 4J3<BR>905-790-2800 ext. 4350<BR>allen.taylor@mdacorporation.com 
<P>
<HR>

<P></P>_______________________________________________<BR>Tkinter-discuss mailing list<BR>Tkinter-discuss@python.org<BR>http://mail.python.org/mailman/listinfo/tkinter-discuss<BR></BLOCKQUOTE></BODY></HTML>