A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/070920.html below:

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

[Python-Dev] Adding timeout option to httplib...connect() [Python-Dev] Adding timeout option to httplib...connect()Guido van Rossum guido at python.org
Sat Feb 10 20:42:55 CET 2007
On 2/10/07, skip at pobox.com <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.

Thanks for looking anyway! I had a quick look myself; I think it
relies on the implicit call to connect() in the HTTPConnection class's
request() method. This answers my question: the timeout should be
passed to the HTTPConnection constructor which stores it in an
instance variable just like host and port, and then connect() will get
it from there.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4