[Python-Dev] timeout options in high-level networking modules
Jim Fulton
jim at zope.com
Thu Dec 22 16:34:46 CET 2005
Yesterday, I needed to make a web request in a program (actually a test)
that could block indefinately, so I needed to set a socket timeout.
Unfortunately, AFAICT none of urllib, urllib2, httplib provide options to set
the timeout on the sockets they use. I ended up having to roll my own
code to make the request.
It would be nice if high-level network modules, like the ones mentioned
above, had options to provide a timeout. (For example, urlopen could
grow an optional timout argument.)
Thoughts?
If we think this is a good idea, then someone who has time could start chipping
away at it. I'm happy to work on this *if* I can find time. This would make
a nice easy sprint project at PyCon too.
Jim
--
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the Python-Dev
mailing list