PHP session equivalent?

Walter Burleigh walter_burleigh at yahoo.de
Sat Feb 12 04:05:51 EST 2005


Erik Johnson wrote:

>     There are a lot of things about PHP I was not too keen on and hence
>     why
> my company is primarily doing Python these days, but one thing I was quite
> impressed with was the ease with which it provided session
> functionality...

Like you I think it is a big plus of PHP as a beginner's web development
tool that it provides session management out of the box. It would certainly
make python more attractive for beginners if they could use session
management out of the box, too. (I know that there are lots of web
development frameworks, but they are to be too difficult to learn, if you
are new to web development).

There is no module for session management in the python standard library.
But there are lots of python frameworks that would do this job well (my
favorite: cherrypy). If you think that a whole framework would be overkill,
you either could try to recylce the session part of an existing framework,
or you could write a module for yourself. 

I have written a module which is quite similar to the php session
management, except for that it does no url rewriting when cookies are not
allowed. If you are interested, I will mail you a copy.




More information about the Python-list mailing list