for i in range(1000000):
cal = int(i * 0.3 * 92 / 1000000)
text = "\r {}/{} {}>overlapped".format(fmt_bytes(i),
fmt_bytes(1000000),
"=" * cal)
sys.stdout.write(text)
sys.stdout.flush()
输出与以下相同:
50.56 kB/976.56 kB =>overlappedpped
如何解决?