"The urlopen() and urlretrieve() functions can cause arbitrarily long delays"

7segment 7segment at live.com
Sun Feb 24 14:25:36 EST 2013


On Sun, 24 Feb 2013 11:55:09 -0700, Ian Kelly wrote:

> On Sun, Feb 24, 2013 at 10:48 AM, 7segment <7segment at live.com> wrote:
>> Hi!
>>
>> The subject is a segment of a sentence which I copied from Python's
>> official homepage. In whole, it reads:
>>
>> "The urlopen() and urlretrieve() functions can cause arbitrarily long
>> delays while waiting for a network connection to be set up. This means
>> that it is difficult to build an interactive Web client using these
>> functions without using threads."
> 
> I believe what this is warning about is that if a network connection is
> not immediately available when the functions are called, they will block
> while waiting for one rather than returning control to the calling
> function.  If used in an interactive client without threads, this would
> cause the application to appear to "hang" while urllib waits for a
> response.  I don't think it's meant to suggest that urllib is
> responsible for the delays; that sounds like a problem with your network
> configuration.

Thanks. I store all the data (response times) in a database. The figures 
I cited are always nearly the same. For example MSN has response times 
between 60-61 seconds consistently, my site 21-35 seconds, but python.org 
only about 0.3 seconds. the calls to the servers happen during the same 
minute.

And there's nothing wrong with my web connection at home.



More information about the Python-list mailing list