{"title":"\u30aa\u30fc\u30eb\u30c9Python2.4.x\u3067\u306etimeout\u306e\u4ed5\u8fbc\u307f\u65b9","published":"2011-07-18 20:32:36","type":"rich","categories":["python"],"author_url":"https://blog.hatena.ne.jp/a2c/","description":"Python2.6\u3060\u3068 import urllib2 def hoget(): try: result = urllib2.urlopen(req_url, timeout=5) return result.read() except urllib2.URLError, e: print e \u3067\u4ed5\u8fbc\u3081\u308b\u3089\u3057\u3044\u304c\u3001Python2.4.3\u3060\u3068\u4f7f\u3048\u306a\u3044\u3002\uff08\u3044\u307e\u3055\u30892.4\u306a\u306e\u304c\u75db\u3044\u304c\uff09\u3067\u30012.4\u3060\u3068\u3069\u3046\u3059\u308c\u3070\u3044\u3044\u306e\u304b\u5206\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2 import urllib2 import socket socket.setdefaulttimeout(5) def hoget(): try: result = u\u2026","provider_url":"https://hatena.blog","author_name":"a2c","blog_url":"https://a2c.hatenablog.com/","image_url":null,"version":"1.0","url":"https://a2c.hatenablog.com/entry/20110718/1310988756","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fa2c.hatenablog.com%2Fentry%2F20110718%2F1310988756\" title=\"\u30aa\u30fc\u30eb\u30c9Python2.4.x\u3067\u306etimeout\u306e\u4ed5\u8fbc\u307f\u65b9 - When it\u2019s ready.\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","blog_title":"When it\u2019s ready.","provider_name":"Hatena Blog","height":"190"}