March 2003
Intermediate to advanced
656 pages
39h 30m
English
build_opener
build_opener(*handlers)Creates and returns an instance of class
OpenerDirector, covered later in this chapter,
with the given handlers. Each handler can
be a subclass of class BaseHandler, instantiable
without arguments, or an instance of such a subclass, however
instantiated. build_opener adds instances of
various handler classes provided by module urllib2
in front of the handlers you specify, to handle proxies, unknown
schemes, the http, file,
and https schemes, HTTP errors, and HTTP
redirects. However, if you have instances or subclasses of said
classes in handlers, this indicates that
you want to override these defaults.
Read now
Unlock full access