[mod_python] persistent values

Roy S. Rapoport mod_python at ols.inorganic.org
Sun Jun 22 12:59:08 EST 2003


Greetings all,

I'm working on my first real useful mod_python project and I'm finding that
I feel a little clueless here.

I've got an authent handler that works perfectly; one of the things it does
is create a ConfigParser object.  

Now, I want that object to be available for other parts of this
interpreter.  Specifically:

http://mydomain.com/directory

is controlled by dispatcher.py's authenhandler (the function that creates
the configparser object).  

http://mydomain.com/directory/dispatcher.py/init

is, obviously, the init function in dispatcher.py (using the Publisher
handler).  I'd like that function to have access to the CP object without
having to re-initialize the object (after all, that's the whole point of
mod_python).  Simply referring to the same value results in "NameError:
global name 'configp' is not defined."

Suggestions of which part of the documentation to re-read?

-roy




More information about the Mod_python mailing list