I have to download file, I see I can do it using "urllib2".
response = urllib2.urlopen(URL)
file=response.read()
But, I can't read line by line.
Here's what I tried:
response = urllib2.urlopen(URL)
for line in response.read():
#do stuff
All the file is one line. The original file was split by new lines.
Can someone tell me how to change the file to be like the original one?