Timing out URLs

Oleg Broytmann phd at phd.russ.ru
Tue May 23 12:24:14 CEST 2000

On Tue, 23 May 2000, Ty K. Kroll wrote:
>    Question: Is there any way to set a time-out interval when reading URLs.

   There are many. All are not so simple. Patches accepted.

> I use urlopen to fetch the pages, but some end up hanging when I hit a slow
> moving page. Is there any way to avoid this? Thanks. -Ty

   Possible ways: use multiprocessing (forking or multithreading); use
non-blocking sockets and select(); use asyncore library.

Oleg.            (All opinions are mine and not of my employer)
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.

More information about the Python-list mailing list