[Tutor] urllib2.urlopen(....., timeout=)

Ray Jones crawlzone at gmail.com
Fri Sep 7 17:16:41 CEST 2012


2.7.3
According to the docs, urlopen has a timeout capability. But it says
that the timeout = '<object object>'

I've tried integers as the timeout value, I've tried floats....it
doesn't complain about my values, but neither does it timeout. Can
anyone point me to the solution to getting the urlopen to timeout if the
target system isn't responding for some reason? What kind of objects is
it expecting?


Ray


More information about the Tutor mailing list