[mod_python] Same name, different directories...

Jeff Stearns jeffstearns at attbi.com
Thu Apr 4 11:51:48 EST 2002


This is probably a bug in import_module() in apache.py.  There are several
bugs in this function, and they show up in different ways sepending on how
you set PythonAutoReload and whether you use the publisher module.

I have tried various workarounds, but each workaround seems to expose a
different problem with this code.

Using unique names for each file is one thing that helps to reduce your
exposure to these bugs.  Turning on PythonAutoReload can help in some cases.

But rewriting import_module is probably what's really needed here.

-jeff stearns


----- Original Message -----
From: "Javier Quinteros" <jquinte at fadu.uba.ar>
To: <mod_python at modpython.org>
Sent: Thursday, April 04, 2002 10:28 AM
Subject: [mod_python] Same name, different directories...


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi !!!
> I've defined three Directories in my http.conf, all of them with python
> scripts inside. What i've noticed is that if I have more than one module
> called "module1.py" in different directories, mod_python is not able to
work
> with both of them. It seems that it loads the first one (it doesn't matter
> which one) and after that, if I call the second one is the first one the
one
> who answers me. After that I had to rename some modules just to avoid the
> possibility that mod_python use them the way he wants.
>
> Is there any solution? I mean, I don't want to get one interpreter for
each
> Directory I define.
>
> Thanks in advance,
>
> - --
> - ---------------------------------
> Javier Quinteros
> jquinte at fadu.uba.ar
> Secretaría de Planificación
> Universidad de Buenos Aires
> - ---------------------------------
> Existe un solo lugar donde el Norte y el Sur del mundo se enfrentan en
> igualdad de condiciones: es una cancha de fútbol de Brasil, en la
> desembocadura
> del río Amazonas. La línea del ecuador corta por la mitad el estadio
Zerao, en
> Amapá, de modo que cada equipo juega un tiempo en el sur y otro tiempo en
el
> norte.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE8rJtQdBzRnlFl4cgRAnPsAKDC1Q7KTH7QGL8XxdEPqvY9Zwud5gCfZHe0
> sAcXkDQlrdfyrQvaq5rmuPc=
> =qwm3
> -----END PGP SIGNATURE-----
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
>




More information about the Mod_python mailing list