[mod_python] Interference with two directories trying to import a different module with the same name

Alain Tesio alain at onesite.org
Thu Jun 27 01:03:09 EST 2002

Hi, I have an inteference from two scripts which
are supposed to be completely independent, but both
import a different module having a same name.

I just mention this in case you consider this problem to be
a bug, it's not a problem for me.

Details below if needed


In the apache config file :


Alias /observer.py /home/observer/scripts/observer_www.py

<Directory /home/observer/scripts>
  AddHandler python-program .py
  PythonHandler observer_www
  PythonDebug On


Alias /other/ /home/other/www/lib/other_www.py

<Directory "/home/other/www/lib">
  AddHandler python-program .py
  PythonHandler other_www
  PythonDebug On

Then I have an error when I try to get a page with the first
setup because it tries to use a module already imported by
the other one (it works fine though if I request this page
just after restarting apache because it loads the right
module, but of course the other one fails then)


Traceback (most recent call last):

  File "/home/observer/scripts/observer_www.py", line 20, in handler
  File "/home/other/www/lib/mycgi.py", line 379, in css_string
    for (key,value) in css:

More information about the Mod_python mailing list