[mod_python] Modules with identical name in different directories

Gregory (Grisha) Trubetskoy grisha at modpython.org
Sat May 19 13:35:58 EST 2001


On Sat, 19 May 2001, David Yeung wrote:

> If I have two different python modules with identical name (index.py), e.g.:
>
>    http://host/pytest1/index.py/mainpage
>
> and
>
>    http://host/pytest2/index.py/mainpage
>
> When I access the first index.py module, the mod_python import the first index.py.
> Then I switch to access the second index.py. Will the mod_python know it is a
> different module with the first one, and then import the second 'index.py'
> automatically? Or it will use the already imported 'index.py' module?

By default it will use already imported index.py module. But you can use
the PythonInterpPerDirectory, in which case the two would run in separate
subinterpreters.

Grisha




More information about the Mod_python mailing list