Inserting cookies into a web session

John Gordon gordon at panix.com
Wed Jul 23 14:55:34 EDT 2008


I'm developing a web application that needs a semi-persistent way to
store information.

I've looked at some options such as writing entries to a database table
or creating small textfiles, but I'm not thrilled with anything I've come
up with so far.

Then a coworker suggested that I could just insert a cookie into the
current session, which would store whatever information I wanted.  This
seems like a really good solution.  That's what cookies are *for*, right?

But I've never worked with cookies before.  Is there a Python package for
handling cookies?  And are there any back-end requirements?  I assume you
would have to be running a webserver that supports sessions.  Do you also
have to be running some sort of web container or servlet engine?

Thanks for any suggestions.

-- 
John Gordon                   A is for Amy, who fell down the stairs
gordon at panix.com              B is for Basil, assaulted by bears
                                -- Edward Gorey, "The Gashlycrumb Tinies"




More information about the Python-list mailing list