urlopen and timeout

Steve Holden sholden at holdenweb.com
Thu Feb 8 00:10:32 CET 2001


A case for Tom O'Malley's timeoutsocket module. You can set a default
timeout on sockets before you try to connect on them, which even works when
the socket connection is made inside a library routine.

Take a look at

    http://www.timo-tasi.org/python/timeoutsocket.py

regards
 Steve
--
Tools, training and technology to help you meet your information needs



"Hwanjo Yu" <hwanjoyu at uiuc.edu> wrote in message
news:rekg6.522$853.6664 at vixen.cso.uiuc.edu...
> Hi,
> It seems there is no way for us to set up the timeout explicitly in the
> urlopen function.
> Although it may have the default timeout in the function, it seems to wait
> forever sometimes because of the unexpected web site's behavior.  Is there
> any way to set the timeout explicitly ?
> And,
> The socket function also doesn't have timeout parameter, so I don't have
any
> idea when the socket connection function is gonna return.
> How to set timeout for these cases ?
> Thanks.
>
>
>




More information about the Python-list mailing list