title: Cookies in python
body: <p>I am trying to write a script in python which uses the Cookie library to set cookies. I have written the following method:</p>
  
  <pre><code>import uuid
  import Cookie
  import sys
  import os
  
  def send_cookie(key, value, max_age):
      cookie = Cookie.SimpleCookie()
      cookie[key]=value
      cookie[key]['max-age']=max_age
      print cookie.output()
  </code></pre>
  
  <p>The problem is when I call this method multiple times for example, send_cookie('foo',123,1000), send_cookie('foo2',12345,1000).
  I would 'assume' that these cookies are stored onto my computer. When I print the os.environ['HTTP_COOKIE'], I dont't see any of the cookies I set in there. </p>