Questions about asyncore

Frank Millman frank at chagford.com
Fri Aug 1 01:15:40 EDT 2008


On Jul 31, 10:39 pm, "Giampaolo Rodola'" <gne... at gmail.com> wrote:
> On 31 Lug, 08:30, Frank Millman <fr... at chagford.com> wrote:
>
>
> I don't know why you find more convenient running asyncore.loop in a
> separate thread but if your purpose is writing a test suite in which a
> client checks responses sent by server I *would not* recommend using
> asyncore.
> The common way to do that is starting the server into setUp() method
> and shut it down in tearDown().
> Every test consists in a client which uses the socket module to
> connect() to the server, send() something and recv() the response.
> That's all.
> pyftpdlib, which consists of an asyncore-based FTP server, has a test
> suite behaving exactly like that.
> Try to take a look and see if it could fit your purposes:http://code.google.com/p/pyftpdlib/source/browse/tags/release-0.4.0/t...
>
>

Ok, I see where you are coming from. I had a look at your test suite,
and I can see how its approach differs from mine. I will study it
carefully.

Thanks very much for all the help.

Frank



More information about the Python-list mailing list