grabbing a cookie

Jose Isaias Cabrera jicman at cinops.xerox.com
Wed Oct 4 14:59:26 EDT 2000


you are the goods!  Thanks!

----- Original Message ----- 
From: "Alex Martelli" <aleaxit at yahoo.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Wednesday, October 04, 2000 10:39 AM
Subject: Re: grabbing a cookie


> "Jose Isaias Cabrera" <jicman at cinops.xerox.com> wrote in message
> news:8radpp$hhc$1 at news.wrc.xerox.com...
>     [snip]
> > reply, msg, hdrs = h.getreply()
>     [snip]
> > for x in hdrs:
> 
> hrds is an instance of mimetools.Message, not a sequence; see
> the Python Library Reference at 11.4.1 (description of the
> getreply method).  As 12.2.1 in the same manual explains,
> you can use hdrs.headers (a sequence of lines, each with a
> trailing newline) or more directly hdrs.get('Set-Cookie')
> to get the content of that particular headerline.
> 
> See, e.g.:
> http://starship.python.net/crew/jrush/Webbot/Cookie.py.html
> for an example of a Python module handling cookies.  That
> one serves to *prepare* the Set-Cookie headerlines (for a
> CGI script) rather than *decode* them back into values,
> but it might still help.  I think the encoding you want
> to undo is quoted-printable, and I think there's a quopri.py
> around somewhere in the Python standard libraries, too.
> 
> 
> Alex
> 
> 
> 
> 
> 
> -- 
> http://www.python.org/mailman/listinfo/python-list
> 





More information about the Python-list mailing list