a python script which will parse an email message

C

chuck amadi

(Please include python-list/comp.lang.python on your mails. You'll get more
useful feedback.)

chuck> Hi Skip used your snippet - the above returns a

chuck> Returned mail: see transcript for details
chuck> Returned mail: see transcript for details

Assuming those are the subjects of the messages in /var/spool/mail/chucka,
that looks fine.

chuck> The second snippet - returns
chuck> <open file '/tmp/subjects', mode 'w' at 0x3fcf0ea0> Returned mail: see
chuck> transcript for details
chuck> <open file '/tmp/subjects', mode 'w' at 0x3fcf0ea0> Returned mail: see
chuck> transcript for details
chuck> When i less /tmp/subjects theres no data.

What version of Python are you using? Maybe it's so old it doesn't support
the

print >> openfile, ...

construct, though if not, I'd expect a SyntaxError. Did you forget the
">>"?

Skip
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top