[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

Alain




In the apache config file :

# 1ST DIR

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

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

# 2ND DIR

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

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



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)

http://www.floc.net/observer.py?page=login...

Traceback (most recent call last):

  File "/home/observer/scripts/observer_www.py", line 20, in handler
    (content_type,content)=wwwlib.out(selfurl,form_items)
....
  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