[mod_python] Trouble with path= in apache.import_module

Graham Dumpleton grahamd at dscpl.com.au
Thu Feb 17 01:54:56 EST 2005


On 17/02/2005, at 4:11 PM, Damjan wrote:

> I have a file /home/www/simpletal/tttt.py, and modpython setup to
> execute a handler (irelevant but the handler is mptal.py) in a
> <Directory /home/www/simpletal> config tag, so that the
> /home/www/simpletal direcotry is added to the sys.path y modpython.
>
> In my handler I try to use apache.import_module. The problem is that:
>
> apache.import_module('tttt') # Works, but
> apache.import_module('tttt', path='/home/www/simpletal') # Doesn't 
> work!

Try:

   apache.import_module('tttt', path=['/home/www/simpletal'])

Ie., path as a list instead of a string.

Graham



More information about the Mod_python mailing list