[mod_python] mod_python.Importer.path; set dynamically

Martijn Moeling martijn at xs4us.nu
Fri Feb 1 06:04:19 EST 2008


Graham,

As you might remember I added a MySQLdb section to session.
(to be able to save sessions across computers)

In my system a lot of additional data is added to the req object, which is passed
around. in my case it is req.Session.user.

(I do not use http based auth, since this is in conflict with my web based desktop)

nevertheless, i can change your "example code" to my needs, consider req.user as the distinguisher for ease of thinking.

Martijn



-----Original Message-----
From: Graham Dumpleton [mailto:graham.dumpleton at gmail.com]
Sent: Thu 31.01.2008 23:03
To: Martijn Moeling
Cc: mod_python at modpython.org
Subject: Re: [mod_python] mod_python.Importer.path; set dynamically
 
On 01/02/2008, Martijn Moeling <martijn at xs4us.nu> wrote:
> Hi!
>
>  I am an extensive mod_python user and my system needs something special.
>
>  Consider the following:
>
>  in httpd.conf I have :
>
>  PythonOption mod_python.importer.path ["/var/www/python_modules"]
>
>  /var/www/html/index.py is linked to ../python_modules/index.py
>
>  the python_modules directory has subdirectories, like; developer1,
> developer2
>
>  the python_modules contains stable modules and developerX holds development
> versions.
>
>  I have load balancing with multiple frond-ends (apache/MP) and one backend
> (MySQL).
>
>  I would like to dynamically change the mod_python.importer.path so that
> developer1 runs code in the corresponding subdir if the module exists,
>  else fall back to the python_modules directory.
>
>  Any tips, suggestions, remarks?

What is the distinguisher used to know which developer it is? Are you
using something like Basic authentication and so could distinguish
based on req.user?

If you tell me what the distinguisher is, probably have an idea.

Graham

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20080201/43851144/attachment.html


More information about the Mod_python mailing list