>>> import urllib
>>> f = urllib.urlopen('
http://www.google.com.hk/')
>>> firstLine = f.readline() #读取html页面的第一行
>>> firstLine
'<!doctype html><html itemscope="" itemtype="
http://schema.org/WebPage"><head><meta content="/images/google_favicon_128.png" itemprop="image"><title>Google</title><script>(function(){\n'!