[mod_python] Big Issue w/ sys.path

Gregory (Grisha) Trubetskoy grisha at modpython.org
Sun Feb 8 16:14:57 EST 2004



On Sun, 8 Feb 2004, jalil wrote:

> I think Apache starts mod_python in one process and shares it across
> apps and when I set sys.path in one app it is visible to the other app.

This is the way it should work. sys.path is global to the sub-intepreter,
so if both apps are running in the same sub-interpreter, then they share
sys.path (as well as lots of other things).

There are two things you can do - first rethink your app so that you don't
have to change sys.path, the second way is to ensure that the apps are
running in seprate sub-interpreters.

The manual has more info on this:

http://www.modpython.org/live/current/doc-html/pyapi-interps.html

Grisha


More information about the Mod_python mailing list