NoBugs!
February 10th, 2010, 04:39 AM
I'm using urllib2 to download files, but there seems to be a bug in the read() function. It uses way too much cpu, even when I use it in a while loop such as:
next = a.read(1000)
total+=next
while (len(next)>0):
next = a.read(1000)
total += next
A sleep() in the while loop helps, but slows the download.
Apparently it is a bug in python (http://bugs.python.org/issue1411097), is there any way to get around this?
next = a.read(1000)
total+=next
while (len(next)>0):
next = a.read(1000)
total += next
A sleep() in the while loop helps, but slows the download.
Apparently it is a bug in python (http://bugs.python.org/issue1411097), is there any way to get around this?