Message174914
The summary assumes that issue 10050 is valid i.e., urlretrieve is
reimplemented using new urlopen and 2.x FancyURLopener is deprecated.
It might not be so [1]. In this case the summary is incorrect.
Old implementation is available as:
opener = FancyURLopener()
urlretrieve = opener.retrieve
btw, the new implementation doesn't prevent you to estimate the
progress:
def make_reporthook():
read = 0 # number of bytes read so far
def reporthook(blocknum, blocksize, totalsize):
nonlocal read
read += blocksize
if totalsize > 0:
percent = read * 1e2 / totalsize
print("%5.1f%% %*d / %d" % (
percent, len(str(totalsize)), read, totalsize))
else:
print("read %d" % (read,))
return reporthook
[1]: http://mail.python.org/pipermail/python-dev/2011-March/109450.html |
|
Date |
User |
Action |
Args |
2012-11-05 15:01:36 | akira | set | recipients:
+ akira, techtonik |
2012-11-05 15:01:36 | akira | set | messageid: <1352127696.25.0.765592353517.issue16409@psf.upfronthosting.co.za> |
2012-11-05 15:01:36 | akira | link | issue16409 messages |
2012-11-05 15:01:35 | akira | create | |
|