Local class variables? (mod_python problem)

Diez B. Roggisch deets at nospam.web.de
Thu Feb 22 08:50:09 EST 2007


Rory Campbell-Lange wrote:

> We have a set of classes using static methods to retain reference
> variables between operations. The problem is that the static variables
> are not reset between operations when used through mod_python.
> 
> Although it is possible to reset the class variables between invocations
> of the system, this has the potential of 'wiping out' these variables
> when another user is using the system.
> 
> Is there a way of getting the equivalent of 'local class variables'? In
> other words, a way of making 'print a' and 'print b' below provide the
> same output?


It's very unclear what you mean here, and I'm additionally under the
impression that you are deep in the murky waters of accidential concurrent
access errors here. 

I suggest you explain better what these variables are supposed to contain,
for whom, and for how long, and then we might suggest a better solution.

Diez



More information about the Python-list mailing list