simple script to read and parse mailbox

From: Chuck Amadi (chuck_at_smtl.co.uk)
Date: 06/07/04


Date: Mon, 07 Jun 2004 16:00:13 +0100
To: python-list@python.org

Hi again when I try /home/testwwws/Mail/work Mail folder I get the following error

sevenofnine:/data/tmp/pythonScriptMail # python getSurveyMail.py
Traceback (most recent call last):
  File "getSurveyMail.py", line 34, in ?
    fp = open("/home/testwwws/Mail/work")
IOError: [Errno 13] Permission denied: '/home/testwwws/Mail/work'
sevenofnine:/data/tmp/pythonScriptMail #

When I run the script as testwwws

sevenofnine:[pythonScriptMail] % python getSurveyMail.py
Traceback (most recent call last):
  File "getSurveyMail.py", line 34, in ?
    fp = open("/home/testwwws/Mail/work")
IOError: [Errno 21] Is a directory
sevenofnine:[pythonScriptMail] %

So what am I missing as I assumed that /var/spool/Mail/testwwws would generate all the email messages but I only need whats in the work Mail folder created using procmailrc .

Cheers

Chuck



Relevant Pages

  • Re: Windows Cmd.exe Window
    ... print a traceback and pause before exiting. ... > I like to write python scripts to do small tasks and then double click ... Add a special first line to every python script and give it a .cmd ...
    (comp.lang.python)
  • Re: Idiom for running compiled python scripts?
    ... call in the script which is deleting some temp files and I get the ... Traceback: ... I don't know exactly what happened so it doesn't work anymore but script finalization is always a bit fragile. ... All values in all modules dictionaries (holding globals) are set to None. ...
    (comp.lang.python)
  • Re: Idiom for running compiled python scripts?
    ... call in the script which is deleting some temp files and I get the ... Traceback: ... I don't know exactly what happened so it doesn't work anymore but script finalization is always a bit fragile. ... All values in all modules dictionaries (holding globals) are set to None. ...
    (comp.lang.python)
  • cgitb vs traceback
    ... formatters the error is recorded as coming from the line where cgitb.text is ... The entire output from the script is below. ... standard traceback is repeated inside cgitb.text and differs from the nicely ... A problem occurred in a Python script. ...
    (comp.lang.python)
  • Re: Odd error
    ... The script selectively extracts ... IDLE looks at the path. ... traceback and error message do not match, so this is indeed an 'odd' error. ...
    (comp.lang.python)