Python Cookies module? Bugs?
Benjamin Schollnick
junkster at nospam.rochester.rr.com
Fri Oct 22 10:57:51 EDT 1999
I've been working with "Cookie.py" on a Windows NT Machine,
and running into some hickups....
For example, I'm trying to use "Max-age", "Comment", and
"Expires" in my cookies to allow them to be persistant.
Here's the "Docs":
|Each element of the Cookie also supports all of the RFC 2109
|Cookie attributes. Here's an example which sets the Path
|attribute.
|
| >>> C["joe"]["path"] = "/home/joe"
But, that doesn't work right in practice.
I'm forced to do this:
C:\>python
>>> mycookie["PSG"]["path"] = "/docushare"
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "D:\OS2\PYTHON\LIB\UserDict.py", line 14, in __getitem__
def __getitem__(self, key): return self.data[key]
KeyError: PSG
^^^ Error ^^^^
>>> mycookie["PSG"] = "PSG Cookie"
>>> mycookie["PSG"]["path"]="/docushare"
>>> print mycookie
Set-Cookie: PSG="PSG Cookie"; Path=/docushare;
Can anyone confirm that this is proper behavior for this
module?
Also, in my informal testing, when I start messing with
Cookie Attributes (i.e. Path, etc), the cookie isn't
being restored properly...
Anyone have any hints, and/or examples of Cookie.py use?
Is there any "preferences" in the python world on Cookie
Modules? (I.e. any better/worse/etc modules)
- Benjamin
====================================================
(Remove "NoSpam" to Email me)
====================================================
Please feel free to copy any and or all of this sig.
A little something for spam bots:
root at localhost postmaster at localhost admin at localhost
abuse at localhost postmaster at 127.0.0.1
Chairman William Kennard: bkennard at fcc.gov
Commissioner Susan Ness: sness at fcc.gov
Commissioner Harold Furchtgott-Roth: hfurchtg at fcc.gov
Commissioner Michael Powell: mpowell at fcc.gov
Commissioner Gloria Tristani: gtristan at fcc.gov
consumerline at ftc.gov
fccinfo at fcc.gov
ssegal at fcc.gov
More information about the Python-list
mailing list