return httplib.HTTPResponse._read_status(self)


class Connection(httplib.HTTPConnection):
    response_class = Response


class Handler(urllib.request.HTTPHandler):

    def http_open(self, req):
        return self.do_open(Connection, req)
h = Handler()
o = urllib.request.build_opener(h)
f = o.open(url)
print(f.read())
How do I gracefully interrupt urllib2 downloads?