Lines Matching refs:opener
385 because ``urlopen`` (or the opener object used) may have followed a
401 When you fetch a URL you use an opener (an instance of the perhaps
403 the default opener - via ``urlopen`` - but you can create custom
410 installed, for example to get an opener that handles cookies, or to get an
411 opener that does not handle redirections.
413 To create an opener, instantiate an ``OpenerDirector``, and then call
417 creating opener objects with a single function call. ``build_opener`` adds
424 ``install_opener`` can be used to make an ``opener`` object the (global) default
425 opener. This means that calls to ``urlopen`` will use the opener you have
455 ``HTTPBasicAuthHandler`` and an opener to use this handler.
480 # create "opener" (OpenerDirector instance)
481 opener = urllib2.build_opener(handler)
483 # use the opener to fetch a URL
484 opener.open(a_url)
486 # Install the opener.
487 # Now all calls to urllib2.urlopen use our opener.
488 urllib2.install_opener(opener)
519 >>> opener = urllib2.build_opener(proxy_support)
520 >>> urllib2.install_opener(opener)
582 .. [#] urllib2 opener for SSL proxy (CONNECT method): `ASPN Cookbook Recipe