[mod_python] retaining state between handlers

Miguel Marques miguel at yorku.ca
Thu Oct 19 15:08:15 EST 2000


On Mon, 2 Oct 2000 23:26:40 -0400 (EDT), Gregory Trubetskoy <grisha at modpython.org> wrote:
> 
> For those of you handy with CVS - I've checked in the new version, where
> the request object is a real Python object (as opposed to a built-in),
> which you can modify.
> 
> This allows passing information between handlers by simply doing something
> like:
> 
> req.myvariable = "something"
> 
> in one handler and then using that value in another. 
> 
> Note that different subinterpreters will have different requests objects,
> even though the underlying built-in (now req._req) is still the same.
> 
> --
Was this included in 2.6?  I just tried to do this between my Access Handler and
my Handler and it didn't work.

						Miguel

C. Miguel Marques, York University, Computing & Network Services
e-mail: miguel at yorku.ca, voice: (416)736-2100x22684, fax: (416)736-5830



More information about the Mod_python mailing list