server wide variables

Graham Dumpleton Graham.Dumpleton at
Tue Jun 26 02:29:48 CEST 2007

On Jun 26, 1:29 am, Jay Sonmez <meti... at> wrote:
> I want to be able to save some server variables as long as Apache runs
> on the server (mod_python).
> How is that possible in Python?

It depends on whether you expect all Apache child processes for that
server to be able to access the data and for the data to be able to
survive the killing off and start up of individual Apache child

For background on some of the issues read:

Saving data in os.environ is not recommended even if they have to
survive just within the context of that specific interpreter within
that process, as os.environ access and update is not thread protected
and Apache child processes may be multithreaded.

So, read that referenced document and then perhaps explain you
expectations a bit better.


More information about the Python-list mailing list