Timeout for urllib.urlopen(...)

Oleg Broytmann phd at phd.russ.ru
Thu Oct 12 11:30:46 EDT 2000


On Thu, 12 Oct 2000, Gilles Lenfant wrote:
> Has any of you any hint for making like urllib.urlopen(...) but with a
> TimeOut ?
> I'm making a script to check if the Web application server is running.
> If it's down... the urllib.urlopen(...) waits for a reply till... there's no
> more power supply.

   First thing to try is http://www.timo-tasi.org/python/timeoutsocket.py

Oleg.
---- 
    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