session information in cgi scripts

James Gregory james at anchor.net.au
Mon Mar 31 07:27:14 EST 2003


On Fri, 2003-03-28 at 20:29, robin wrote:
> James Gregory <james at anchor.net.au> wrote:
> 
> >Simple qn: Is there a module that implements session data? Or rather,
> >what is the module that implements session data? I'm using python as a
> >CGI so storing stuff in my own webserver isn't really an option. I
> >looked on http://python.org/doc/current/modindex.html and nothing leapt
> >out at me.
> 
> You could try my Wasp:
> http://www.execulink.com/~robin/wasp/readme.html

Thanks,

I managed to get my own session module to work eventually. The problem
was that I was opening the file to send the pickled object to in the
destructor of the class, and neglecting to close the file. I had assumed
that when the file object went out of scope at the end of the
destructor, the file would be closed by virtue of it's destructor being
called.

I'm still not entirely sure why what I did changed things. I'm new to
this so for now I'm just assuming there are some rules about destructors
that I don't know. I'll look into it more when there's a bit less
pressure here :)

James.







More information about the Python-list mailing list