"Guido van Rossum" <[EMAIL PROTECTED]> wrote:
> 
> I recently needed to access an HTTP URL with a timeout. I ended up
> monkey-patching httplib.HTTPConnection so that the connect() method
> has an optional second paramer, timeout, defaulting to None; if not
> None, a call to settimeout() is added right after successful creation
> of the socket.
> 
> Does anybody else think this is a good idea? (Personally I think this
> should've been done years ago. :-) Shall I check it into the head?

I've done similar things to urllib in the past (also handling timeouts
and insufficient data transfer rates).

Seems like a reasonable change to me.  It also makes me think that I
should switch to httplib (since all the urls I ever fetch are http).

 - Josiah

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to