How to set cookie in client machine

Chris Rebert clp at
Tue Oct 14 07:56:06 CEST 2008

See the 'cookie' module:

A. In the future, Google is your friend! That page is the top hit for
"python cookie" for Christ's sake; it's not hard to find.
B. Please don't post your question again just because it isn't
answered fast enough. You didn't even wait one whole day before

Follow the path of the Iguana...

On Mon, Oct 13, 2008 at 10:39 PM, Good Z <goodz158 at> wrote:
> Hello,
> I want to set {name, value} cookie on client machine.
> My requirement is that when user comes to the website hosted on our server
> and login into his account, we would like to set user specific information
> in cookie (on his machine) that will be used later when HTTP request comes
> in. Is there a generic program that may help me out in setting the cookie on
> client machine?
> I will not be able to use HttpResponse and set cookie in it since within the
> program i need to redirect it to different URL.
> Regards,
> Mike
> --

More information about the Python-list mailing list