1.文件读取 1.1从url读取 import urllib2 url ='http://www.baidu.com' data = urllib2.urlopen(url) print data.read()