I imaplib reliable?

Roger Binns rogerb at rogerbinns.com
Mon Mar 25 02:12:36 EST 2002


> I'm just not sure if Python's imaplib has been war tested.

When I last tried it about 6 months ago, I found it to be full of
problems.  In particular it pretty much just returned raw IMAP
protocol strings for most operations.  The user of the library
then has to do far too much parsing work.

If you want some examples, look in the IMAP spec for literals
(where there is a number in squiggly brackets followed by that
many bytes of data).  Python's imaplib just returns that all
to you, and you have to parse everything out.  Given a valid
imap implementation could put almost any data as literals
(especially things like funky folder names), this makes working
with imaplib very low level and tedious, and not much different
than having to write it yourself.


--
Roger






More information about the Python-list mailing list