| Store | Cart

Program not Stripping Headers from Email though Working fine

From: dont bother <dont...@yahoo.com>
Thu, 4 Mar 2004 22:33:04 -0800 (PST)
when I change the code to msg.as_string() to
msg.get_payload() I get this error:

user at localhost codes]$ python email2.py
Traceback (most recent call last):
  File "email2.py", line 36, in ?
TypeError: argument 1 must be string or read-only
character buffer, not list

How to fix this? The first argument must not be list.
My first argument is a file containing many email


--- Gerrit <gerrit at nl.linux.org> wrote:
> dont bother wrote:> > The code is here, but I dont know why the headers> are> > still present in the output file.> > > fwrite.write(msg.as_string())>                ~~~~~~~~~~~~~~~> > The as_string header returns both the headers and> the body. You want> something like get_payload()> > Gerrit.> > -- > Weather in Twenthe, Netherlands 04/03 14:55 UTC:> 	7.0??C haze mostly clear wind 4.5 m/s E (57 m above> NAP)> -- > Asperger's Syndrome - a personal approach:> 	http://people.nl.linux.org/~gerrit/english/

Do you Yahoo!?
Yahoo! Search - Find what you?re looking for faster

Recent Messages in this Thread
dont bother Mar 05, 2004 06:33 am
Gerrit Mar 04, 2004 03:33 pm
Messages in this thread