[Python-bugs-list] [ python-Bugs-457114 ] Incorporate timeoutsocket.py into core
noreply@sourceforge.net
noreply@sourceforge.net
Thu, 30 Aug 2001 22:48:27 -0700
Bugs item #457114, was opened at 2001-08-30 22:48
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=457114&group_id=5470
Category: Python Library
Group: Feature Request
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Nobody/Anonymous (nobody)
Summary: Incorporate timeoutsocket.py into core
Initial Comment:
I was responding to a question on c.l.py earlier about
urllib hanging and was reminded of Tim O'Malley's
timeoutsocket.py. It's a shim above socket that allows
you to set timeouts on any TCP connections. Back in
January, Jeff Bauer suggested in c.l.py that it be
included in the core. I agree that it provides useful
extra functionality beyond the current socket
implementation and would like it to be considered for
addition to the standard distribution. Here's a
pointer:
http://www.timo-tasi.org/python/timeoutsocket.py
Here's how you use it:
import timeoutsocket
import httplib
timeoutsocket.setDefaultSocketTimeout(20)
# at this point any sockets created
# will have a 20-second timeout
h = httplib.HTTP("www.python.org")
Pretty simple, huh?
Skip
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=457114&group_id=5470