a python script which will parse an email message

From: chuck amadi (chuck.amadi_at_ntlworld.com)
Date: 05/31/04


Date: Mon, 31 May 2004 16:24:35 +0100
To: python-list@python.org


(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



Relevant Pages