Re: "The urlopen() and urlretrieve() functions can cause arbitrarilylong delays"

Discussion in 'Python' started by MRAB, Feb 24, 2013.

  1. MRAB

    MRAB Guest

    On 2013-02-24 18:55, Ian Kelly wrote:
    > On Sun, Feb 24, 2013 at 10:48 AM, 7segment <> 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.
    >

    When in doubt, check some other way, such as with a browser.
    MRAB, Feb 24, 2013
    #1
    1. Advertising

  2. Am 24.02.2013 20:27 schrieb 7segment:

    >> When in doubt, check some other way, such as with a browser.

    >
    > Thank you Ian. Browser is not a good idea, because I need this tool to
    > work automatically. I don't have time to check and compare the response
    > times manually and put them into the database.


    Of course not for the long term. But you could check e.g. if MSN needs
    60 s as well from the browser. If not, there could be something else wrong.

    Thomas
    Thomas Rachel, Feb 24, 2013
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Kelly
    Replies:
    0
    Views:
    96
    Ian Kelly
    Feb 24, 2013
Loading...

Share This Page