[mod_python] apache.import_module picks wrong module

Glenn A. Hochberg gah at research.att.com
Thu Mar 25 11:56:32 EST 2004


On Thu, 25 Mar 2004 17:30:11 +0100,
Kamil Niechajewicz <kamil at nvstudio.pl> wrote:

actually i've renamed all files that had the same names
in both applications to some, so that they all differ
now and are not messed, but it cost me alot of work
that shouldn't be necessary.

I would guess you that you need to use separate subinterpreters (see 
http://www.modpython.org/live/mod_python-2.7.8/doc-html/pyapi-interps.html).
The problem is likely that, since the two directories are sharing the 
same python interpreter, whichever one gets hit first imports the 
commonly-named module first--and once it's imported it gets cached and 
not re-imported when the other directory gets hit.  Using 
PythonInterpPerDirective would likely solve this.

    -Glenn





More information about the Mod_python mailing list