[Twisted-Python] POP3 improvements

Itamar Shtull-Trauring twisted at itamarst.org
Mon Dec 30 11:48:25 EST 2002

On 30 Dec 2002 11:27:23 -0500
Abe Fettig <abe at fettig.net> wrote:

> Currently it works like this:  When you send a command that returns a
> multi-line response (LIST or RETR), you pass an optional file-like
> object that the response should be written to.  If no file argument is
> supplied a StringIO is used.  When the server is finished sending the
> response, handle_COMMANDNAME is called, passing back the file object
> containing the downloaded response.

Instead of calling handle_COMMANDNAME, why not return a Deferred of the

> At this point I'm still not correcting byte-stuffed lines in
> downloaded messages, so I need to do that.  Also, if it would be OK
> with everyone, I think it might be nice to make POP3Client a little
> higher-level, so that LIST, for example, would return an actual list
> instead of a file(or, in the current implementation, a string) that
> the implementer has to parse.  And it might be good to offer support
> for more POP3 commands like TOP.

Or perhaps the Deferred should return that.

Itamar Shtull-Trauring    http://itamarst.org/
Available for Python, Twisted, Zope and Java consulting
***> http://VoteNoWar.org -- vote/donate/volunteer <***

More information about the Twisted-Python mailing list