mailbox module broken!

Skip Montanaro skip at pobox.com
Thu Oct 3 14:15:09 EDT 2002


    Stuart> The following trivial code to read through a unix mailbox skips
    Stuart> a little over 100 messages in the mailbox at

    Stuart> http://www.bmsi.com/python/test/inbox
    ...
    Stuart> import mailbox

    Stuart> f = open('inbox','r')
    Stuart> mbox = mailbox.UnixMailbox(f)
    ...

Does the problem disappear if you use the mailbox.PortableUnixMailbox class?
Many systems don't generate valid From_ lines.  PortableUnixMailbox treats
any line beginning with "From " as a From_ line.  UnixMailbox uses a much
stricter definition.

-- 
Skip Montanaro - skip at pobox.com
"Airplanes don't fly until the paperwork equals the weight of the
aircraft. Same with i18N." - from the "Perl, Unicode and i18N FAQ"




More information about the Python-list mailing list