[mod_python] Problem with modules of the same name

Graham Dumpleton graham.dumpleton at gmail.com
Thu Dec 20 18:45:16 EST 2007

On 20/12/2007, S.R.Pardá <linux at qbox.es> wrote:
> Hi All,
> I'm trying to setup 2 modPython aplications with modpython.psp handler.
> ModPython is 3.3 tha comes with ubuntu 7.10.
> In both applications I have a module named users.py into the
> path /modules inside of the root for the psp pages of the application.
> I imported the module in the psp page with:
>         import users
> When navigating the pages of each, the pages that loads the users
> module, can load any of the modules of the same name, so it displays
> users of the other application.
> I have tried to use:
>         apache.import_module('users' , path='modules')
> But doesn't resolve the problem.

The 'path' argument must be a list.

  apache.import_module('users' , path=['modules'])

It also must be an absolute path or uses special anchors to make it relative.

Read the documentation for import_module().



More information about the Mod_python mailing list