[Python-bugs-list] [ python-Bugs-458885 ] rfc822.Message.unixfrom is not documented
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 05 Sep 2001 15:03:59 -0700
Bugs item #458885, was opened at 2001-09-05 13:38
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458885&group_id=5470
>Category: Documentation
>Group: None
>Status: Open
Resolution: Invalid
Priority: 5
Submitted By: Skip Montanaro (montanaro)
>Assigned to: Fred L. Drake, Jr. (fdrake)
>Summary: rfc822.Message.unixfrom is not documented
Initial Comment:
The mailbox.UnixMailbox class makes it easy to walk
over a Unix From_-style mailbox. Unfortunately, it
loses the From_ line. From_ lines are not part of
RFC822 message headers, so they should be kept by the
UnixMailbox
instance. I tried a couple things in a private subclass
of UnixMailbox, but didn't come up with something
workable. Ideally, when I have an rfc822.Message object
from Unixmailbox I should be able to ask the mailbox
object for its from_ line.
----------------------------------------------------------------------
>Comment By: Skip Montanaro (montanaro)
Date: 2001-09-05 15:03
Message:
Logged In: YES
user_id=44345
Ah! Thanks! Reopening as a doc bug and reassigning to Fred,
which explains why I didn't find it. ;-)
Patch attached...
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2001-09-05 13:51
Message:
Logged In: YES
user_id=6380
The From_ line is saved as the 'unixfrom' attribute of the
message objects -- this is a standard feature of the
rfc822.Message class.
Example:
>>> fn = "/var/spool/mail/guido"
>>> box = mailbox.UnixMailbox(open(fn))
>>> m = box.next()
>>> m.unixfrom
'From python-bugs-list-admin@python.org Wed Sep 5 16:42:21
2001\n\
'
>>>
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=458885&group_id=5470