[Tutor] password protection in httplib

Andre Engels andreengels at gmail.com
Fri Mar 3 15:26:14 CET 2006


2006/3/3, Kent Johnson <kent37 at tds.net>:

> Have you tried using a CookieManager as shown in the first example here:
> http://docs.python.org/lib/cookielib-examples.html
>
> Once you set up your opener with a CookieJar the cookies should be
> handled automatically - if a server sets a cookie it will be remembered
> and returned back to the server on subsequent requests.
>
> This page has more examples though again IMO they are overly complex:
> http://www.voidspace.org.uk/python/articles/cookielib.shtml

I had looked at it yes, but I don't know how to combine the two
handlers (the one for authentication and the one for cookies). Apart
from that I hoped that because the program already has cookie handling
programmed in, reusing that code might be less trouble than splitting
the authenticated and the non-authenticated case everywhere.

--
Andre Engels, andreengels at gmail.com
ICQ: 6260644  --  Skype: a_engels


More information about the Tutor mailing list