urllib hangs

Baalbek thats at it.com
Mon Aug 23 19:00:08 EDT 2004


Didn't he just say: "For older python versions, ask google for 
timeoutsocket.py"?


Jay Donnell wrote:
> Thanks, but I'm on python 2.2 and don't have the ability to upgrade it
> on the server. How would I do this in 2.2?
> 
> 
>>since 2.3 there's socket.setdefaulttimeout(), this should to the job:
>>
>>import socket
>>socket.setdefaulttimeout(10)
>># throw socket.timeout exception after 10s,
>># default is to wait a infinitly (or at least a very, very long time...)
>>
>>For older python versions, ask google for timeoutsocket.py




More information about the Python-list mailing list