Steve Holden <[EMAIL PROTECTED]> writes:
> What do you actually think
>
> for m in msg:
> print m
>
> should do? Why do you believe that what you think it should do would
> be a natural choice?
I think it odd for a Message to support the mapping protocol. However,
since
En Sat, 14 Jul 2007 06:26:43 -0300, Tzury <[EMAIL PROTECTED]>
escribió:
>> What do you actually think
>>
>> ... for m in msg:
>> ... print m
>>
>> should do? Why do you believe that what you think it should do would be
>> a natural choice?
>
> I needed to know how to extract part
> What do you actually think
>
> ... for m in msg:
> ... print m
>
> should do? Why do you believe that what you think it should do would be
> a natural choice?
I needed to know how to extract particular parts of a message, such as
the message 'body', 'subject', 'author', etc.
I co
Ben Finney wrote:
> Steve Holden <[EMAIL PROTECTED]> writes:
>
>> Ben Finney wrote:
>>> Which is a bug in the 'email.message' module, in my view. If it's
>>> attempting to support a mapping protocol, it should allow
>>> iteration the same way standard Python mappings do: by iterating
>>> over the
Steve Holden <[EMAIL PROTECTED]> writes:
> Ben Finney wrote:
> > Which is a bug in the 'email.message' module, in my view. If it's
> > attempting to support a mapping protocol, it should allow
> > iteration the same way standard Python mappings do: by iterating
> > over the keys.
>
> Stop assuming
En Fri, 13 Jul 2007 07:38:01 -0300, Tzury <[EMAIL PROTECTED]>
escribió:
>> Which is a bug in the 'email.message' module, in my view. If it's
>> attempting to support a mapping protocol, it should allow iteration
>> the same way standard Python mappings do: by iterating over the keys.
>
> I thoug
Ben Finney wrote:
> "Gabriel Genellina" <[EMAIL PROTECTED]> writes:
>
>> msg is an instance of MaildirMessage (subclass of Message) - it has
>> no specific iterator, so "for m in msg" tries to use the sequence
>> protocol, starting at 0; that is, tries to get msg[0]. Message
>> objects support the
> Which is a bug in the 'email.message' module, in my view. If it's
> attempting to support a mapping protocol, it should allow iteration
> the same way standard Python mappings do: by iterating over the keys.
I thought it is a bug as well, but who am I a python newbie to say so.
I found inspect.g
"Gabriel Genellina" <[EMAIL PROTECTED]> writes:
> msg is an instance of MaildirMessage (subclass of Message) - it has
> no specific iterator, so "for m in msg" tries to use the sequence
> protocol, starting at 0; that is, tries to get msg[0]. Message
> objects support the mapping protocol, and msg
En Thu, 12 Jul 2007 21:46:32 -0300, Tzury <[EMAIL PROTECTED]>
escribió:
> I am getting the following error when trying to iterate in a message
> in a Maildir directory.
> please help.
>
from mailbox import Maildir, MaildirMessage
mbox = Maildir('path/to/mailbox', create = False, factor
10 matches
Mail list logo