import urllib
webURL = "http://www.python.org"
localURL = "index.html"
u = urllib.urlopen(webURL)
buffer = u.read()
print u.info()
print "Read %d bytes from %s.\n" % (len(buffer), u.geturl())
u = urllib.urlopen(localURL)
buffer = u.read()
print u.info()
print "Read %d bytes from %s." % (len(buffer), u.geturl())