[mod_python] Cookies

Graham Dumpleton graham.dumpleton at gmail.com
Wed Nov 26 06:18:54 EST 2008

2008/11/26 Cristian Re <cristian.re at gmail.com>:
> Hello, I have a problem with cookies.
> I have a site who makes some cookies in a python cgi using
> Cookie.SimpleCookie().
> Now I want to introduce a script handled by mod_python but i didn't idea how
> to read the cookies.
> I have imported the Cookie module:
> from mod_python import Cookie
> and in the function i did:
> cookies = Cookie.get_cookies(req)
> but cookies is always an empty dictionary

This only reads the cookies if set. How are you setting them in the first place?

Have you tried examples as written in:


See also:



More information about the Mod_python mailing list