[Zope] How to create a global variable?

Jonathan dev101 at magma.ca
Thu Feb 22 08:17:21 EST 2007


<snip>
----- Original Message ----- 
From: jerome prudent
To: zope at zope.org
Sent: Thursday, February 22, 2007 5:50 AM
Subject: [Zope] How to create a global variable?
Hi!
I've a python script which creates a dictionnary each time it's called. This 
dictionnary is always the same. I would increase the performance if I could 
generate and cache the dictionnary once, then reuse it. I'm looking for a 
space like REQUEST.SESSION that is the same for each user of my website 
(other solutions are welcome).
</snip>

You could easily create a property field on a folder that contains the 
'global' information.  Any script or method that has access to that folder 
can access that property field.


Jonathan



_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev ) 



More information about the Zope mailing list