Mark,

It might also work if you just used import e.g.:

import /path/to/output-file

Though I like the one where it checks that the file exists first.  Another
enhancement to the original method might be to guarantee that the
MY_DATED_ADDRESS has a value:

EXTRA_CONFIG = '/path/to/output-file'
if os.path.exists(EXTRA_CONFIG):
    execfile(EXTRA_CONFIG)

if not vars().has_key('MY_DATED_ADDRESS'):
    MY_DATED_ADDRESS = "[EMAIL PROTECTED]"

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of David Grimberg
> Sent: Thursday, October 21, 2004 1:33 PM
> To: 'Mark Horn'; [EMAIL PROTECTED]
> Subject: RE: Using TMDA to protect my son's email?
> 
> Very sorry I was combining filter file syntax with config 
> file syntax.  Try
> this instead of the include statement:
> 
> EXTRA_CONFIG = '/path/to/output-file'
> if os.path.exists(EXTRA_CONFIG):
>     execfile(EXTRA_CONFIG) 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Mark Horn
> > Sent: Thursday, October 21, 2004 11:06 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Using TMDA to protect my son's email?
> > 
> > On Thu, Oct 21, 2004 at 10:45:43AM -0700, David Grimberg wrote:
> > > include -optional /path/to/output-file
> > 
> > What version of TMDA supports the "include" option?  I'm getting
> > errors:
> > 
> > Uncaught Python 2.3.4 Exception (Thu Oct 21 13:59:56 2004):
> > -----------------------------------------------------------
> > Traceback (most recent call last):
> >   File "/usr/bin/tmda-filter", line 53, in ?
> >     execfile(os.path.join(execdir, 'tmda-rfilter'))
> >   File "/usr/bin/tmda-rfilter", line 175, in ?
> >     from TMDA import Defaults
> >   File "/usr/lib/python2.3/site-packages/TMDA/Defaults.py", 
> > line 89, in ?
> >     execfile(TMDARC)
> >   File "/home/XXXXXXX/.tmda/config", line 63, in ?
> >     include -optional /path/to/output-file
> > NameError: name 'include' is not defined
> > 
> > _____________________________________________
> > tmda-users mailing list ([EMAIL PROTECTED])
> > http://tmda.net/lists/listinfo/tmda-users
> > 
> _____________________________________________
> tmda-users mailing list ([EMAIL PROTECTED])
> http://tmda.net/lists/listinfo/tmda-users
> 
_____________________________________________
tmda-users mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-users

Reply via email to