Session variables?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve

    Session variables?

    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

  • Paul Rubin

    #2
    Re: Session variables?

    Steve <nospam@nopes > writes:[color=blue]
    > 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,[/color]

    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.

    Comment

    • Tuure Laurinolli

      #3
      Re: Session variables?

      Steve wrote:[color=blue]
      > 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,[/color]

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

      Comment

      Working...