Wouter van Marle
wouter at squirrel-systems.com
Fri May 13 00:39:14 EDT 2005
On Thu, 2005-05-12 at 23:48 -0400, Graham Dumpleton wrote: > Wouter van Marle wrote .. > > > Using "import main" is not a good idea when the "main.py" is also being > > > loaded by mod_python by its module loading system. Instead of: > > > > > > import main > > > > > > use: > > > > > > main = apache.import_module("main") > > > > > > > apache.import_module("main") works, as in it loads the module, however > > now the "module not found" errors have been replaced by "AttributeError: > > 'module' object has no attribute 'get_session'" errors. So still not > > really a solution... > > > > I'll at least check out the apache module, maybe indeed something > > different to what you suggested. > > Do you have a "main.py" located anywhere else in your document tree? All .py files are in the same directory (/python/main.py and /python/user.py_. The issue as described below doesn't have to do with it I think. Wouter. > There are some issues with using the same named file with the publisher > extensions in more than one directory. This may or may not be related: > > http://issues.apache.org/jira/browse/MODPYTHON-9 > http://issues.apache.org/jira/browse/MODPYTHON-10 > http://issues.apache.org/jira/browse/MODPYTHON-11 > > The original import problem is covered by: > > http://issues.apache.org/jira/browse/MODPYTHON-12 > > Graham > >
|