Python:Email and Header Parsing: Some Help
dontbotherworld at yahoo.com
Thu Feb 26 09:51:40 CET 2004
I have written this small piece of code. I am a brand
new player of Python. I had asked some people for
help, unfortunately not many helped.
Here is the code I have:
fread = open('email_message', 'r')
#fwrite = open('output','w')
This way I am able to print the entire email message
on the stdout. The program generates an error If I try
to write the output to a file-- It says the argument
(here msg) should be a string but not as an instance
like here. How to write the message to another file
2. I have so many headers in the email message
I want to parse the headers separtely and message
separately. Does anyone has an example code to deal
Also I want to remove the redundant words and all html
tags. Any advise on that?
I saw some examples using HTMLGen But I dont have
HTMLGen with python on my machine. I have Python
2.3.3. on my machine.
All help is greatly appreciated.
Do you Yahoo!?
Get better spam protection with Yahoo! Mail.
More information about the Python-list