[mod_python] Session management

Chris Jackson christopher.jackson at gmail.com
Tue Jan 11 16:23:06 EST 2005


<myconfig>
mod_python version = 3.1.3
Apache version = 2.0.52
python version = 2.4
</myconfig>

My goal is to allow the creation of multiple, separate sessions, as
well as create global variables which all sessions have access to. 
I'm having trouble understanding how to use mod_python.Session even
after looking at the available documentation.  In particular, i'm
concerned with where to put "sess = Session(req)."

I'm a little fuzzy on the memory space or variable scoping.  Apache
runs multiple threads, and there's a single embedded python
interpreter.  When multiple requests from different locations hit my
mod_python page, all these requests get processed under the same
interpreter?  I want to use sessions because I think some of the data
is being overlapped/shared between different requests, but I want data
to be rationed out in sessions and some data still shared between
sessions such as a database connection object.

Any help on this will be much appreciated.

~= Chris =~


More information about the Mod_python mailing list