>>> from urllib import urlopen >>> res = urlopen('http://ya.ru') >>> dir(res) ['__doc__', '__init__', '__iter__', '__module__', '__repr__', 'close', 'code', 'fileno', 'fp', 'getcode', 'geturl', 'headers', 'info', 'next', 'read', 'readline', 'readlines', 'url'] >>> print res.headers Server: nginx Date: Wed, 14 Nov 2012 17:52:49 GMT Content-Type: text/html; charset=UTF-8 Connection: close Cache-Control: no-cache,no-store,max-age=0,must-revalidate Content-Length: 5455 Expires: Wed, 14 Nov 2012 17:52:50 GMT Last-Modified: Wed, 14 Nov 2012 17:52:50 GMT P3P: policyref="/w3c/p3p.xml", CP="NON DSP ADM DEV PSD IVDo OUR IND STP PHY PRE NAV UNI" Set-Cookie: yandexuid=5227038611352915570; Expires=Sat, 12-Nov-2022 17:52:49 GMT; Domain=.ya.ru; Path=/ X-Frame-Options: DENY X-XRDS-Location: http://openid.yandex.ru/server_xrds/