[Twisted-Python] POP3 improvements

Andrew Bennetts andrew-twisted at puzzling.org
Tue Dec 31 01:40:43 EST 2002

On Tue, Dec 31, 2002 at 01:24:40AM -0500, Christopher Armstrong wrote:
> Euughhh.. that sounds really horrible at first glance. Are there any
> cases you can think of that actually make use of passing in different
> Protocol classes? Also, how much less flexible would it be to simply
> set the protocols as attributes on the FTPClient if you want to
> override?  (similar to Factory.protocol). The FTPClient would then just use
> 'self.whateverProtocol'. This agrees much more with what a lot of
> Twisted already does, I think.

I do need to use different protocols, or at least I did at a previous job...
I had a program that downloaded TIFF files and text files.  TIFF files
needed to be written to disk and processed, text files were written to disk
for posterity, but were processed as they came in.  

Also, an FTPClient can have multiple commands queued (It seems reasonable to
be able to do f.cd('foo/bar'); f.retr('file1'); f.retr('file2')), so an
instance attribute isn't a sane option.

Any other ideas, though?  I would like to make it cleaner.


More information about the Twisted-Python mailing list