There's no way to set a timeout if you use "urllib" to open a URL.
"HTTP", which "urllib" uses, supports this, but the functionality
is lost at the "urllib" level.
It's not available via "class URLopener" or "FancyURLopener ", either.
There is a non-thread-safe workaround from 2003 at
but it was rejected as a feature at
https://sourceforge.net/tracker/?fun...&group_id=5470
without anything better going in. Despite this, current documentation
recommends that approach:
Someone proposed to fix this
but was discouraged from doing so.
The code was forked by Zope as a workaround in 2003:
but that's not in the mainstream Python tree.
The correct fix would probably be to add methods to class
URLopener to control this; that's the usual way of handling special
URL opening situations.
John Nagle
"HTTP", which "urllib" uses, supports this, but the functionality
is lost at the "urllib" level.
It's not available via "class URLopener" or "FancyURLopener ", either.
There is a non-thread-safe workaround from 2003 at
but it was rejected as a feature at
https://sourceforge.net/tracker/?fun...&group_id=5470
without anything better going in. Despite this, current documentation
recommends that approach:
Someone proposed to fix this
but was discouraged from doing so.
The code was forked by Zope as a workaround in 2003:
but that's not in the mainstream Python tree.
The correct fix would probably be to add methods to class
URLopener to control this; that's the usual way of handling special
URL opening situations.
John Nagle
Comment