(py)curl有getinfo
import pycurl
import cStringIO
curl = pycurl.Curl()
buff = cStringIO.StringIO()
curl.setopt(pycurl.URL, 'http://example.org')
curl.setopt(pycurl.WRITEFUNCTION, buff.write)
curl.perform()
print "status code: %s" % curl.getinfo(pycurl.HTTP_CODE)