reading Unix mailbox
Skip Montanaro
skip at pobox.com
Wed Apr 16 08:57:37 EDT 2003
Alessio> I am using Python2.3 alpha and I thought there was something
Alessio> updated to iterate over the messages of a mailbox in mbox
Alessio> format, but the next() method still return a deprecated RFC822
Alessio> message object reference, am I wrong? Is there a way to read
Alessio> mailboxes in mbox format but iterating over MIMEMessages?
Try:
from spambayes import mboxutils
mbox = mboxutils.getmbox("somefile")
for msg in mbox:
do_stuff(msg)
Skip
More information about the Python-list
mailing list