On Dec 20, 4:15 pm, Robert Latest <[EMAIL PROTECTED]> wrote:
> Steven D'Aprano wrote:
[...]
> > All methods are attributes (although the opposite is not the case), so if
> > a method doesn't exist, you will get an AttributeError.
>
> I see. I've already gathered that Python likes to use different w
Steven D'Aprano wrote:
> message['to'] looks up the key 'to', raising an exception if it doesn't
> exist. message.get('to') looks up the key and returns a default value if
> it doesn't exist.
Ah, so the [] notation got hung up on some message right at the beginning
and didn't even let the scri
Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Thu, 20 Dec 2007 09:31:10 +, Robert Latest wrote:
>
[snip most of question and helpful answer]
>
> But note that message.get_payload() will return either a string (for
> single part emails) or a list of Messages (for multi-part messages).
>
No
On Thu, 20 Dec 2007 09:31:10 +, Robert Latest wrote:
> 1. Why can I get the 'subject' and 'from' header field unsig the []
> notation, but not 'to'? When I print Message.keys I get a list of all
> header fields of the message, including 'to'. What's the difference
> between message['to'] and m
Robert Latest wrote:
> Hello,
>
> I'm new to Python but have lots of programming experience in C, C++ and
> Perl. Browsing through the docs, the email handling modules caught my eye
> because I'd always wanted to write a script to handle my huge, ancient, and
> partially corrupted email archive
Hello,
I'm new to Python but have lots of programming experience in C, C++ and
Perl. Browsing through the docs, the email handling modules caught my eye
because I'd always wanted to write a script to handle my huge, ancient, and
partially corrupted email archives.
Of course I know that this ki