How best to achieve asynchronous socket input and output?

Fredrik Lundh fredrik at pythonware.com
Mon Nov 24 05:25:11 EST 2003


Kylotan wrote:

> I'm writing a wxPython telnet-like application that needs to be able
> to send and receive data independently of each other. The asyncore
> library comes close to what I want, but still requires I have a
> blocked thread (the one that calls asyncore.loop() ).

using a timer to poll asyncore tends to work pretty well.

for examples, see "Managing Downloads" and "Keeping the network
traffic going" on this page:

    http://effbot.org/zone/effnews-3.htm

(you can search for "poll" to find the relevant portions)

</F>









More information about the Python-list mailing list