Jeff Hinrichs
jlh at cox.net
Wed Apr 14 20:15:26 EST 2004
----- Original Message ----- From: "Gregory (Grisha) Trubetskoy" <grisha at modpython.org> To: "Jeff Hinrichs" <jlh at cox.net> Cc: <mod_python at modpython.org> Sent: Wednesday, April 14, 2004 9:40 AM Subject: Re: [mod_python] mod_python.publisher weirdness > > > I think this is becoming a FAQ.... > > You cannot have modules with the same name in one Python interpreter. > Since both of the below directories execute within the same > subinterpreter, if you use same names for modules (index.py) as well as > any global variables, you will have name clashes and rather unpredictable > behaviour. > > The solution is to either name things differently, or configure Apache > such that mrt and mrtJDB run in different subinterpreters. > > I recommend reading this part of the manual: > > http://www.modpython.org/live/current/doc-html/pyapi-interps.html > > Grisha Ok, I think I grok this now and it makes sense. I've implemented the PythonInterpPerDirectory On for each httpd.conf section that I'm running. And it works like what I initially, but incorrectly, thought would happen. I've read the section 4.1 Multiple Interperters and 5.4.4 PythonInterPerDirectory. Will the pitfalls of URI translation impact my use of sessions? It looks as if I was trying to intertwine my app tightly with the Apache request flow I might get some unintended effects but since I don't think that is what I am after should I be ok? Also, If I wanted to hide the .py extensions and I don't want to use the PythonInterPerDirectory, I would most likely need to implement some apache rewrite rules to do something like /foo -> /foo/foo.py /foo/bar -> foo/bar/bar.py Correct? -Jeff p.s. I am starting to write up an FAQ entry for this. Do you think it should go in Section 2. Problems Running or another section?
|