I am just trying to fetch data from a live web by using the urllib module, so I wrote a simple example
Here is my code:
import urllib sock = urllib
This is what i use to get data from urls, its nice because you could save the file at the same time if you need it:
import urllib result = urllib.urlretrieve("http://diveintopython.org/") print open(result[0]).read()
output:
'