blocking forever with urllib

Skip Montanaro skip at pobox.com
Thu Aug 30 20:31:11 EDT 2001


    Mike> Is there a way to specify a timeout for this library? I can't find
    Mike> a way in the documentation.

There's nothing I'm aware of in the core distribution, but I have seen two
third-party modules that provide this.  One is timeoutsocket, the other
timeout_socket.  Despite the similar names, they approach the problem in
fundamentally different ways.  I think you will find timeoutsocket easier to
use.  Here are pointers to both:

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

    http://www.cs.usyd.edu.au/~piers/python/timeout_socket.py

-- 
Skip Montanaro (skip at pobox.com)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list