Session variables?

S

Steve

Hi,

I'm trying to find a clean way of sharing variables across different
python webpages and scripts and I need something like a session variable
for each user. Is this possible in Python? I've been "pickling" stuff
and this doesn't work at all with mutliple users as things get mixed up.
Is there any clean way of doing this? Thanks,


Steve
 
P

Paul Rubin

Steve said:
I'm trying to find a clean way of sharing variables across different
python webpages and scripts and I need something like a session
variable for each user. Is this possible in Python? I've been
"pickling" stuff and this doesn't work at all with mutliple users as
things get mixed up. Is there any clean way of doing this? Thanks,

One way is put all the variables into a browser cookie. You have to
be careful about security when you do that though. Don't use a pickle.
 
T

Tuure Laurinolli

Steve said:
Hi,

I'm trying to find a clean way of sharing variables across different
python webpages and scripts and I need something like a session variable
for each user. Is this possible in Python? I've been "pickling" stuff
and this doesn't work at all with mutliple users as things get mixed up.
Is there any clean way of doing this? Thanks,

The session module in jonpy package seems to be a nice base for
sessions, though it lacks some features like explicitly deleting a session.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top