from urllib import urlretrieve
def callback(blocknum, blocksize, totalsize):
print "Downloaded " + str((blocknum * blocksize)),
print " of ", totalsize
urlretrieve("http://www.example.com/my_file.pdf", "my_file.pdf", callback)
print "Download Complete"
No comments:
Post a Comment