Shinyshell Community Forums > Coding > Python Cookies :3 |
||||||
Sign Up | Member List | New Posts | Help |
[1]
October 31 02009, 18:05 GMT | ||||
Peter* A Pythonic One Location: US Post count: 99 |
I was digging through the old threads and trying to figure out how to make a cookie in Python. Here's what I have so far. This is the whole file and I'm not trying to give you a lot to sift through xD I just left all of it in case something was interfering.
#!/usr/bin/env python |
October 31 02009, 18:51 GMT | ||||
lec** Supra stultitiam Location: Varaždin, Croatia Post count: 173 |
You can't end the header output with \n\n, and then send additional headers. What you need to do is print headers with single line end characters until the last one, which has two.
Since Python's print command automatically puts a newline character after any output unless you put a comma behind it, you only need to manually print one: print "Header-name: value" So in your case, you need to print the cookie header before: cookie_expiry = time.time() + 315360000 |
November 03 02009, 12:55 GMT | ||||
Peter* A Pythonic One Location: US Post count: 99 |
Super-excellent! Thank you. ^_^
|
[1]
Forum Information |
||||||||||
|