INNER CODE UNIT · Python
avgKBPerSecond
Ershany/Arcane-Engine · Setup/ArcaneUtils.py:114
avgKBPerSecond = (extractedContentSize / 1024) / elapsedTime
except ZeroDivisionError:
avgKBPerSecond = 0.0
avgSpeedString = '{:.2f} KB/s'.format(avgKBPerSecond)
if (avgKBPerSecond > 1024):
avgMBPerSecond = avgKBPerSecond / 1024
avgSpeedString = '{:.2f} MB/s'.format(avgMBPerSecond)
sys.stdout.write('\r[{}{}] {:.2f}% ({}) '.format('█' * done, '.' * (50-done), percentage, avgSpeedString))
sys.stdout.flush()
sys.stdout.write('\n')
if deleteZipFile:
os.remove(zipFilePath) # delete zip file