Fixed console prints for Linux

This commit is contained in:
Ali Parlakci 2018-08-13 15:55:37 +03:00
parent a1f1915d57
commit 50cb7c15b9

View File

@ -23,8 +23,9 @@ def dlProgress(count, blockSize, totalSize):
downloadedMbs = int(count*blockSize*(10**(-6)))
fileSize = int(totalSize*(10**(-6)))
sys.stdout.write("\r{}Mb/{}Mb".format(downloadedMbs,fileSize))
sys.stdout.write("\b"*len("\r{}Mb/{}Mb".format(downloadedMbs,fileSize)))
sys.stdout.write("{}Mb/{}Mb".format(downloadedMbs,fileSize))
sys.stdout.write("\r")
# sys.stdout.write("\b"*len("\r{}Mb/{}Mb".format(downloadedMbs,fileSize)))
sys.stdout.flush()
def getExtension(link):