urllib hangs

Jay Donnell jaydonnell at yahoo.com
Tue Aug 24 00:16:10 CEST 2004

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