[mod_python] Keeping data in memory

Primožič Boštjan bostjan.primozic at amis.net
Tue Feb 9 06:16:21 EST 2010


It works with global variables, but if there is more than one thred/instance 
of interpreter there will be problems.

> Hi,
>
> I'd like to know if it's possible and how to store some data in memory.
> I get small amount of date by parsing some other pages and this takes
> relativly long time, so I want to keep this data in memory ( if posible ). 
> I
> heared something about storing this data in "global" variable which stays 
> in
> memory all the time.

Have you actually tried using Google to search for 'Python global 
variables'.

http://www.google.com/search?client=safari&rls=en&q=python+global+variables&ie=UTF-8&oe=UTF-8

Understand what global variables are in Python and you have your answer.

Graham 



More information about the Mod_python mailing list