D. Hartley wrote: > P.S. Kent - thank you for the helpful tutorials on authentication, > they really cleared up the process a great deal. The only problem is: > > When I create an opener to process the cookies, it looks like this: > > opener = > urllib2.build_opener(urllib2.HTTPCookieProcessor(myjar)) > > ..where myjar is cookielib.CookieJar() > > But in the examples for authentication, when I create the opener: > > opener = urllib2.build_opener(authhandler) > > ..where authhandler is urllib2.HTTPBasicAuthHandler(passwordmanager) > > So both use build_opener, but the thing I pass in, from what I am > looking at so far, has to be a cookie processor OR an authenticator. > How can I do both at once?
I think build_opener() can take multiple arguments: cookieHandler = urllib2.HTTPCookieProcessor(myjar) authhandler = urllib2.HTTPBasicAuthHandler(passwordmanager) opener = urllib2.build_opener(cookieHandler, authhandler) Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor