[Baypiggies] urllib2.urlopen() and exception layering

Keith Dart keith at dartworks.biz
Sun Apr 6 13:17:19 CEST 2008


On Sat, 5 Apr 2008, Gregory P. Smith wrote:

> urllib2 is a pretty big mess and does unfortunately violate the general rule
> of exception catching + retyping + reraising being a bad idea.

BTW, if you are doing this kind of thing a very good alternative is 
pycurl, a wrapper for the libcurl library. This does introduce an external 
dependency, but curl/libcurl is a useful thing to have around, anyway.



-- 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Keith Dart <keith at dartworks.biz>
    public key: ID: 19017044
    <http://www.dartworks.biz/>
    =====================================================================


More information about the Baypiggies mailing list