[Tutor] Basic asyncio usage

Piotr HusiatyƄski piotrhusiatynski at gmail.com
Tue Mar 25 18:07:18 CET 2014


Hi,
I'm trying to get more familiar with asyncio library. Using python
3.4, I wrote simple echo server (see attachement for the code). I know
that instead of using bare bone send/recv I could use some of the
helper functions, but I want to start with the basics.

Using current code, I can connect from multiple sources, but echo
won't work for all clients. Also, please look at the `sendall` mehtod
- I have to manually remove write callback, otherwise it will be
called all the time. Any tips on solving this problem?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asynciotest.py
Type: text/x-python
Size: 2065 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20140325/6a7236e9/attachment.py>


More information about the Tutor mailing list