On Tue, Dec 15, 2009 at 4:01 PM, Grant Edwards inva...@invalid.invalidwrote:
On Tue, Dec 15, 2009 at 2:36 PM, MRAB pyt...@mrabarnett.plus.com
mailto:pyt...@mrabarnett.plus.com wrote:
You've just created a cookie, but are trying to get a value without
having set it first!
Hi;
import Cookie
...
cookie = Cookie.SimpleCookie()
cookieString = os.environ.get('HTTP_COOKIE')
if not cookieString:
cExpires, cPath, cComment, cDomain, cMaxAge, cVersion = myCookie()
cookie['lastvisit'] = str(time.time())
cookie['lastvisit']['expires'] = cExpires
On Tue, Dec 15, 2009 at 10:05, Victor Subervi victorsube...@gmail.com wrote:
Hi;
import Cookie
...
cookie = Cookie.SimpleCookie()
cookieString = os.environ.get('HTTP_COOKIE')
if not cookieString:
[snip]
else:
cookieFlag = 'old'
print cookie['lastvisit']['expires'].value
Victor Subervi wrote:
Hi;
import Cookie
...
cookie = Cookie.SimpleCookie()
cookieString = os.environ.get('HTTP_COOKIE')
if not cookieString:
cExpires, cPath, cComment, cDomain, cMaxAge, cVersion = myCookie()
cookie['lastvisit'] = str(time.time())
The following lines aren't going
On Tue, Dec 15, 2009 at 2:36 PM, MRAB pyt...@mrabarnett.plus.com wrote:
You've just created a cookie, but are trying to get a value without
having set it first!
LOL! Rewrote code thus:
cookie = os.environ.get('HTTP_COOKIE')
if not cookie:
cookie = Cookie.SimpleCookie()
cExpires,
Victor Subervi wrote:
On Tue, Dec 15, 2009 at 2:36 PM, MRAB pyt...@mrabarnett.plus.com
mailto:pyt...@mrabarnett.plus.com wrote:
You've just created a cookie, but are trying to get a value without
having set it first!
LOL! Rewrote code thus:
cookie = os.environ.get('HTTP_COOKIE')
On Tue, Dec 15, 2009 at 4:05 PM, MRAB pyt...@mrabarnett.plus.com wrote:
What you got from HTTP_COOKIE was a _string_ (or None). You then need to
turn it into a cookie:
cookie_string = os.environ.get('HTTP_COOKIE')
if cookie_string:
cookie = Cookie.SimpleCookie(cookie_string)
On Tue, Dec 15, 2009 at 2:36 PM, MRAB pyt...@mrabarnett.plus.com
mailto:pyt...@mrabarnett.plus.com wrote:
You've just created a cookie, but are trying to get a value without
having set it first!
LOL! Rewrote code thus:
cookie = os.environ.get('HTTP_COOKIE')
if not