RE: Problem reading HTTP_COOKIE

2011-08-12 Thread Jack Hatterly
Chris, I finally got a script that works. Thanks for trying! Jack #!/usr/bin/env python import string import os import datetime, Cookie, random import time # The returned cookie is available in the os.environ dictionary cookie_string = os.environ.get('HTTP_COOKIE') if not cookie_string: ourT

RE: Problem reading HTTP_COOKIE

2011-08-12 Thread Jack Hatterly
> Date: Fri, 12 Aug 2011 21:29:25 +0100 > Subject: Re: Problem reading HTTP_COOKIE > From: ros...@gmail.com > To: python-list@python.org > > I assume that what you mean is that it prints "None" even after you > hit F5 to reload the page, as the first run of the script will never > have a cookie.

Problem reading HTTP_COOKIE

2011-08-12 Thread Jack Hatterly
Hi; I'm trying to get cookies to work and I've traced my problem down to this reduced script: #! /usr/bin/python import string import os import datetime, Cookie, random import time import os def parse_cookie(): print 'Content-Type: text/html\n' print os.environ.get('HTTP_COO

RE: Cookie Problem

2011-08-11 Thread Jack Hatterly
> Some of these values look wrong. Your 'path' ought to be as the > browser sees it, and your 'domain' ditto; ... > Otherwise, I would recommend omitting those elements and allowing the > defaults through. So I commented out those lines and now have this: #!/usr/bin/env python import strin

Cookie Problem

2011-08-10 Thread Jack Hatterly
Hi; I'm trying to get this cookie code to work but it doesn't set the properties I want set (expires, path, comment, etc.). When I delete the cookie and run the script it duly creates a cookie. However, when I reload the page none of the morsels have values associated with them. I also do no