Doing network traffic in the 'background' from Tkinter app??

Fredrik Lundh fredrik at pythonware.com
Tue Nov 2 09:41:41 CET 1999


(Andrew, maybe you should fix your reply-to?)

Andrew Markebo wrote:
> | I can't tell exactly what you're doing from your description, but check
> | out Tk's fileevent callback:
> 
> Bingo, Thanx!
> 
> Basically what I want is to give the user the possibilty to mess
> around with my application while it fetches data from THE internet(TM)
> 
> Darn, it seems to be Unix only... fungus.. I would like my application
> to run on windows also..

forget about fileevents, and use Python's own
asynchronous communications framework in-
stead:

http://www.python.org/doc/current/lib/module-asyncore.html

search the newsgroup archives for more information
on using asyncore with tkinter (basically, you should
keep calling asyncore.poll from an idle task).

for more asyncore examples, check the Medusa
servers (http://www.nightmare.com).  you'll also
find a bunch of asyncore/asynchat examples in
the eff-bot guide.

</F>

<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->





More information about the Python-list mailing list