tkinter, threads and asyncore together

Josiah Carlson jcarlson at nospam.uci.edu
Wed Feb 11 15:52:04 EST 2004


> #to control asyncore
> while 1:
>     asyncore.loop(.1)
>     if not fromgui.empty():
>         #handle messages from GUI
> 
> Another option is to just have one thread, with the mainloop of Tkinter 
> do a single asyncore.loop(0) call every .01 seconds or so.  In wxPython 
> I'd just use a wxTimer, I don't know if Tkinter has an equivalent.

I meant asyncore.poll(.1) and asyncore.poll(0) respectively.

  - Josiah



More information about the Python-list mailing list