<DIV>I think this sort of thing is asked more in this list than anywhere else :-)</DIV>
<DIV>Try using Tk().after(milliseconds, function/method). Sure it can eat up some memory but it works pretty well.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Harlin Seritt<BR><BR><B><I>tkinter-discuss-request@python.org</I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Send Tkinter-discuss mailing list submissions to<BR>tkinter-discuss@python.org<BR><BR>To subscribe or unsubscribe via the World Wide Web, visit<BR>http://mail.python.org/mailman/listinfo/tkinter-discuss<BR>or, via email, send a message with subject or body 'help' to<BR>tkinter-discuss-request@python.org<BR><BR>You can reach the person managing the list at<BR>tkinter-discuss-owner@python.org<BR><BR>When replying, please edit your Subject line so it is more specific<BR>than "Re: Contents of Tkinter-discuss digest..."<BR><BR><BR>Today's Topics:<BR><BR>1. Re: Tkinter and threading (Russell E. Owen)<BR><BR><BR>----------------------------------------------------------------------<BR><BR>Message: 1<BR>Date: Mon, 09 May 2005 12:04:34 -0700<BR>From: "Russell E. Owen" <ROWEN@CESMAIL.NET><BR>Subject: Re: [Tkinter-discuss] Tkinter and threading<BR>To: tkinter-discuss@python.org<BR>Message-ID:
 <ROWEN-1530E1.12043409052005@SEA.GMANE.ORG><BR><BR>In article <IFZ1AL.3LDIE0@WWW.PANDORASDREAM.COM>,<BR>Vania Smrkovski <VANIA@PANDORASDREAM.COM>wrote:<BR><BR>&gt; Hello,<BR>&gt; New to this group, and I have not found much in the way of documentation <BR>&gt; for advanced uses of Tkinter, yet. So far, Tk3k is the most advanced <BR>&gt; resource I have found yet.<BR>&gt; I am trying to implement threading in my Tkinter app. I have managed to <BR>&gt; get a button to fire an FTP download into one of my text areas, but to get <BR>&gt; rid of the delay on the GUI while the FTP process was being handled, I <BR>&gt; created a thread in the button\'s command handler....<BR><BR>You cannot safely make Tkinter from any thread other than the one that <BR>started the tkinter mainloop (i.e. your main thread unless you are doing <BR>something really weird).<BR><BR>As far as network communication goes, you have several options...<BR>- Use the free "twisted framework". It integrates with Tkinter
 and other <BR>GUI toolkits, handles most of the standard protocols and is reported to <BR>be very good.<BR><BR>- For ftp, do the transfer in the background and poll the state. This is <BR>especially appropriate if you have multiple transfers since one polling <BR>loop can poll all of them. For an example see RO.Comm.FTPGet and the <BR>associated widget RO.Wdg.FTPLogWdg in the RO package <BR><HTTP: ROPython.html rowen www.astro.washington.edu>.<BR><BR>- For TCP/IP use a tcl socket and use file events to handle incoming <BR>data and errors. This has the advantage of being asynchronous (and is <BR>completely cross platform unlike the a similar technique at the Tkinter <BR>level). For an example see RO.Comm.TCPConnection and the underlying <BR>RO.Comm.TkSocket.<BR><BR>-- Russell<BR><BR>P.S. there were rumors a few years ago that you could safely generate <BR>Tkinter events from a background thread and have the main thread handle <BR>them. However, I am pretty sure (based on my own
 tests) that it's not <BR>actually safe to do that. My suggestion is to NEVER deal with Tkinter or <BR>Tk from a background thread.<BR><BR><BR><BR>------------------------------<BR><BR>_______________________________________________<BR>Tkinter-discuss mailing list<BR>Tkinter-discuss@python.org<BR>http://mail.python.org/mailman/listinfo/tkinter-discuss<BR><BR><BR>End of Tkinter-discuss Digest, Vol 15, Issue 5<BR>**********************************************<BR></BLOCKQUOTE><p>
                <hr size=1>Yahoo! Mail Mobile<br> 
<a href="http://us.rd.yahoo.com/mail_us/taglines/mobile/*http://mobile.yahoo.com/learn/mail">Take Yahoo! Mail with you!</a> Check email on your mobile phone.