[Python-Dev] Adding timeout option to httplib...connect() (original) (raw)

Facundo Batista facundo at taniquetil.com.ar
Tue Feb 27 13:09:35 CET 2007


skip at pobox.com wrote:

Guido, I looked at urllib2 and quickly gave up. I have no idea how that code works (where is a lower level library's connection object instantiated, for example?). I presume with timeouts in the lower level libraries someone who knows how urllib2 works will be able to graft timeouts onto it without too much work.

I have in my TODO list an item that says "put timout to urllib2.urlopen".

I once digged in urllib2, trying to figure out something, and in a lightning shock I understood it. I took a look at it again a few weeks ago, but this time wasn't able to follow it, :(.

Anyway, I'll check it once again, hope to understand it, and try to came up with a patch to be able to call urllib2.urlopen with "timeout" parameter, for all its protocols.

Regards,

-- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http://www.python.org/ar/



More information about the Python-Dev mailing list