[mod_python] PythonPath problem

Graham Dumpleton grahamd at dscpl.com.au
Thu Mar 31 16:51:20 EST 2005

On 31/03/2005, at 1:13 PM, Shuying Wang wrote:

> On Wed, 30 Mar 2005 21:23:51 -0500, Graham Dumpleton
> <grahamd at dscpl.com.au> wrote:
>> Try passing the actual directory in which the modules are located
>> into the import_module() function. Ie.,
>> where "directory" is substituted with the actual path. By passing it
>> explicitly, you avoid the whole PythonPath problem as it will look
>> specifically in the specified directory.
> That works but I don't understand why the PythonPath directive can't
> do the same thing. Hardcoding the path into a couple of files is fine,
> but doing that for several hundred files isn't really ideal.

At least now that you have something going, you can add logging to see
what sys.path actually gets set to and from that perhaps determine why
PythonPath isn't working.

More information about the Mod_python mailing list