#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2001
    Posts
    40
    Rep Power
    14

    session management in Python


    Ok, couple of quick questions.

    I've dropped myself in the deep-end and started to write some cgi apps. I figured since I know a couple of other languages I should be able to pick this up moderately fast. So far, I can do template systems and interact with mysql databases.

    Heres my main problem right now. I'm used to using PHP's $_SESSION vars and wanted to know if there was a module (like that of MySQLdb) which I can plug-in and allow persistant data control on my applications.

    Could someone point me in the right direction? I've looked at twister and quixote, but both seem to be large "complete applications". Since I'm trying to learn Python, I'd like to build something from the ground up. I've seen a session. module elsewhere, but wasn't sure if it would be what I needed. It looked to be a .so file like that of MySQLdb.

    Also, are there any predefined datatypes like those of PHP's $_SERVER vars?

    I know I'm being too comparitive of PHP, but give me a break

    Any help on this matter would be greatly appreciated. If only I could get this sesison management working, I'd have no need of PHP!

    Yours,
    estron
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Location
    St. George, Utah
    Posts
    63
    Rep Power
    37
    Sorry, can't help you much when it comes to sessions in Python, but the Python-based Zope does have sessioning, along with a lot more that may help you develop Python-based websites.

    (BTW, Zope is what powers the main DevShed.com site.)
    Lucas Marshall
  4. #3
  5. chown python:users\ /world
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Texas Tech
    Posts
    95
    Rep Power
    15
    I don't think there is session support with Python. You can do cookies, but I am pretty sure sessions are not supported.
    Hartmann
    badice.com
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Location
    Nomadic
    Posts
    14
    Rep Power
    0
    I was wondering if "session management" - similiar to php's $_SESSION variables was now available in python version 2.3 ?
  8. #5
  9. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    I've been ticking over writing a session module in my head but i think it's along way off being usable. As far as i'm aware the only sessioning module available is packages with Spyce (http://spyce.sourceforge.net) and so wont really work with Python CGI..

    Mark.
    programming language development: www.netytan.com Hula


IMN logo majestic logo threadwatch logo seochat tools logo