[mod_python] python module loaded, but not parsed (huh?)

Graham Dumpleton grahamd at dscpl.com.au
Sat Jan 14 15:40:55 EST 2006


On 14/01/2006, at 10:57 PM, Fabiano Sidler wrote:

> Oops, my mistake! It was an untested example. In my other code, I pass
> sys.modules[cls.__module__] to loadmodule(), not cls.__module__
> itself.

Accessing into sys.modules like this will most likely not work in
mod_python 3.3. At least not for the module imported using the
PythonHandler directive. This is because modules imported by the
mod_python module loaded will not be registered in sys.modules.
 From mod_python 3.2, modules imported by the module loader in the
mod_python.publisher layer will not be added into sys.modules
either.

Anyway, I wish you luck. Still reckon you would be better building
on work from WSGI or even WebStack:

   http://www.boddie.org.uk/python/WebStack.html

But if the point is to learn stuff, then by all means keep going
the way you are.

Graham



More information about the Mod_python mailing list