Graham Dumpleton
grahamd at dscpl.com.au
Thu Jan 6 16:18:16 EST 2005
On Jan 06 11:31, "Lee E. Brown" <Administrator at leebrown.org> wrote: > > Subject: Re: [mod_python] importing from a PSP file > > Greetings! > > I don't know if this will help you or not, but mod_python actually uses > subinterpreters, each of which have their own namespace separate from the > main interpreter. > > The default behavior is to create a subinterpreter for each virtual host on > the server. However, you can use the PythonInterpPerDirectory directive so > that each directory accessed gets its own namespace based on the absolute > path of the directory being accessed. Or you can use the > PythonInterpPerDirective directive to create a namespace based on the > directory where the Python*Handler was found. You can also use the > PythonInterpreter directive to force the namespace to be based on a supplied > string. Note that PythonInterpPerDirectory has a bug in it which may generate strange results. See: http://www.modpython.org/pipermail/mod_python/2004-November/016788.html In short, requests against the directory and a file in the directory map to different interpreters when they should be the same. This makes it hard to have a default index page served up when directory is accessed. -- Graham Dumpleton (grahamd at dscpl.com.au)
|