[Python-Dev] urllib2.build_opener() broken?

Bill Bumgarner bbum@codefab.com
Thu, 5 Dec 2002 17:24:19 -0500


I'm invoking build_opener() as...

         opener = urllib2.build_opener(proxyHandler)

.... and the handlers appear to be out of order-- the ProxyHandler that 
is supposed to be at the beginning is not ...

[<urllib2.UnknownHandler instance at 0xae6b00>, <urllib2.HTTPHandler 
instance at 0xae6cb0>, <urllib2.HTTPDefaultErrorHandler instance at 
0xae6dd0>, <urllib2.HTTPRedirectHandler instance at 0xae6f60>, 
<urllib2.FTPHandler instance at 0xae6f90>, <urllib2.FileHandler 
instance at 0xae7230>, <urllib2.HTTPSHandler instance at 0xae7320>, 
<urllib2.ProxyHandler instance at 0xae6270>]

 From the comments on build_opener(), it would seem that it doesn't take 
this into account.  However, if it doesn't, then the example used in 
the documentation at the top of urllib2 could not possibly work.

Whose broken?  The module or me?

thanks,
b.bum