def report (count, blockSize, totalSize ):
percent = int (count*blockSize* 100 /totalSize )
sys .stdout.write ("\r%d%%" % percent + ' complete' )
sys.stdout.flush ()
sys .stdout.write ( '\rFetching ' + name + '...\n' )
urllib .urlretrieve (getFile, saveFile, reporthook=report )
sys .stdout.write ( "\rDownload complete, saved as %s" % (fileName) + '\n\n' )
sys .stdout.flush ()
Share This To Help More Peoples Like Us........……………………………………
No comments:
Post a Comment