[FRPythoneers] (no subject)
khellman at mcprogramming.com
Thu Jul 29 16:44:46 MDT 2004
On Thu, Jul 29, 2004 at 02:10:49PM -0600, Jeffery D. Collins wrote:
> (saved an email message in 'message')
> import email
> m = email.message_from_file('message')
> fp = file('message')
> m = email.message_from_file(fp)
> fh = open('jnk_message','w')
> g = email.Generator.Generator(fh)
> # loop over all messages here?
Yes I tried this but it failed to work - however it is no fault of
python. mutt appears to place 'From ' lines at the beginning of
each entry in an mbox file. When it didnt' find these it complained of
an invalid file.
I added some code to duplicate the line as mutt expects to see it (which
it turns out is very specific) and all is good now.
Thanks for all who replied.
Keith Hellman #include <disclaimer.h>
khellman at mcprogramming.com from disclaimer import standard
public key @ www.mcprogramming.com
"One World, one Web, one Program." - Microsoft(R) promotional ad
"Ein Volk, ein Reich, ein Fuhrer." - Adolf Hitler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://lists.community.tummy.com/pipermail/frpythoneers/attachments/20040729/6bb46e26/attachment.bin
More information about the FRPythoneers