[sapug] twisted.mail versus imaplib

Chris Foote chris at inetd.com.au
Tue Aug 7 12:05:58 CEST 2007

On Tue, 7 Aug 2007, John Steele Scott wrote:

> On Mon, 06 Aug 2007 06:38:01 +0930, Daryl Tester wrote:
>> <mode advocate="devil">
>> Putting on my "business" hat (if this is a work application), what's
>> that clunky about the imaplib interface that would require you to
>> spend a significant amount of time learning an entirely new framework?
>> </mode>
> Fair call.
> It's been it while since I last used imaplib, but what's clunky is its
> abstraction, or lack thereof. For some operations, it just returns the
> reply from the server, as a list of strings, and it is not documented what
> the list means (i.e. how the server reply has been split). I can use it to
> do what I want, but it doesn't leave me feeling confident that it won't
> break depending on the phase of the moon (or, more likely, if I use a
> different IMAP server).

That doesn't good, no.  Although not directly Python related, I came
across this excellent article about writing good APIs that's worth
the read:


It sounds like imaplib is not one of them :-(

> What I was hoping for was that someone would tell me that twisted.imap is
> a joy to work with, rock solid, and worth the effort. Or that it's not.

No idea.  You might want to pose the question to the large audience
on the comp.lang.python newsgroup, as there's only a handful of people
on this list.


Chris Foote <chris at inetd.com.au>
Inetd Pty Ltd T/A HostExpress
Web:   http://www.hostexpress.com.au
Phone: (08) 8410 4566

More information about the sapug mailing list