[Zope] exploring sessions

Chris McDonough chrism@zope.com
18 May 2002 19:54:29 -0400


On Sat, 2002-05-18 at 15:07, alan runyan wrote:
> sessions=app.temp_folder.session_data
> trees = [item[0] for item in sessions._ring]
> print [len(tree.keys()) for tree in trees] #always gives me 0 for each key

What about session_data.items()?  The TransientDataContainer that is the
"session_data" object supports most methods that dictionaries do
(keys(), values(), etc).  The interfaces that the sessioning interfaces
support are documented in the help system.

> I am exploring SESSIONS using interactive python.  I also dont see where
> context.REQUEST.SESSION.set('somekey', 'some value') is done --
> where in the source is this actually done?

Transience.TransientObject is where you probably want to look.  

HTH,

- C