[mod_python] converting site from CGI to mod_python

Adam adam at fastmail.com.au
Sun Nov 2 19:30:39 EST 2008

> Use:
>   conffile = os.path.join(os.path.dirname(__file__), "..", "config",
> "bdns.conf")
>   f = open(confile, 'r')

Thanks for the reply.
I did want to try and use mod_python because I think it may be 
interesting to learn. I'm not sure i entirely understand why the 
import_module statement works with relative path names but opening a 
file doesn't work. Does it have to do with the fact that mod_python 
scripts aren't spawned directly from apache as their own process.

More information about the Mod_python mailing list