msg.walk()
Samuel Wright
lykoszine at gmail.com
Mon Jun 28 09:41:09 EDT 2004
"Notice the return ''"
>
> def main():
> fp = open(mailboxfile, 'r')
> mbox = mailbox.UnixMailbox(fp, msgfactory)
> for msg in mbox:
> print msg
> for part in msg.walk():
> print part
> [...]
"You have to do a test for an empty string in your main method (like
the docs say)."
Gotcha. I had assumed that was for mailboxes that might not be well
formatted, and I was checking a mailbox I had exported myself...
Thanks loads.
More information about the Python-list
mailing list