Re: Funny problem: I need to extract data from working instance

Michiel Overtoom <motoom-qWit8jRvyhVmR6Xm/[email protected]> Mon, 20 Feb 2017 11:19:45 +0100
Newsgroups gmane.comp.python.cherrypy
Message-ID <[email protected]>
Hi Serge,

> On 2017-02-19, at 17:32, Serge Z <[email protected]> wrote:
> 
> I have a simple py-script with variable sessions  inside. This var stores objects different data about current users for internal use.
> 
> Any ideas please? 

In a program I once wrote, I printed all active sessions with:

    a = cherrypy.serving.session.cache # dict. Mapping from session-id -> tuple(data dict, last time)

    for k, v in a.iteritems():
        print "%s -> %r" % (k, v)

Greetings,


-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.