[mod_python] Current Working Directory not set?

Graham Dumpleton grahamd at dscpl.com.au
Fri Jan 27 16:13:17 EST 2006


On 28/01/2006, at 8:04 AM, Graham Dumpleton wrote:
>> I would have to do some hack involving seperating the dirname of 
>> __file__ and adding it to sys.modules
>
> I think you must have meant into sys.path. Same above, Modifying 
> sys.path directly
> in mod_python is not usually a good idea either. The use of 
> PythonHandler will
> automatically put that root directory in sys.path for you without 
> having to resort
> to using PythonPath. This all assumes you have already set PythonPath 
> explicitly
> and aren't using Location directive instead of Directory directive to 
> specify context
> in which mod_python is used.

I did it again. :-(

That should have read:

   This all assumes you have already NOT set PythonPath explicitly
   and aren't using Location directive instead of Directory directive to 
specify context
   in which mod_python is used.

Graham



More information about the Mod_python mailing list