Cookie Confusion - How to Set a Cookie



Hi -

I am trying my hand at python cookies. I'm confused about a few
things though. Do the python cookies get written to a cookies text
file? I have simple code below -- I see the cookie in my HTTP header
but do not get anything in the cookie text file. I'm working on
linux.

print "Content-type: text/html"
cookie = Cookie.SimpleCookie()
cookie['Test'] = 'abc'
print cookie
print

Are there rules about where in the header the set cookie line should
be?

Thanks in advance!
Christian
.



Relevant Pages

  • Re: How to set a cookie using Cookie Module
    ... This is my first attempt at python cookies. ... I'm using the Cookie ... If I put javascript code to create a cookie in place of my python ... cookie code, ...
    (comp.lang.python)
  • Re: How to set a cookie using Cookie Module
    ... This is my first attempt at python cookies. ... I'm using the Cookie ... If I put javascript code to create a cookie in place of my python ... cookie code, ...
    (comp.lang.python)
  • Re: OT - How Web Apps Do/Should Detect Authentication
    ... Is it some kind of cookie? ... URL rewriting that put the session id in the URL ... that we can send an HTTP header to their product and it would ... it may be secure. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: OT - How Web Apps Do/Should Detect Authentication
    ... Is it some kind of cookie? ... URL rewriting that put the session id in the URL ... that we can send an HTTP header to their product and it would ... how can this be secure if ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: OT - How Web Apps Do/Should Detect Authentication
    ... Is it some kind of cookie? ... URL rewriting that put the session id in the URL ... that we can send an HTTP header to their product and it would ... it may be secure. ...
    (microsoft.public.dotnet.languages.csharp)