##language:zh ''' 文章来自《Python cookbook》. 翻译仅仅是为了个人学习,其它商业版权纠纷与此无关! ''' -- feynman [<>] <> == 描述 == ... === 问题 Problem === 你想要从web的一个url抓取html文件 === 解决 Solution === urllib.urlopen 返回 a file-like object,你能调用read() {{{ #!python from urllib import urlopen doc = urlopen("http://www.python.org").read( ) print doc }}} === 讨论 Discussion ===