标签:div std out end print col data- process 进度
import time,sys
for i in range(100):
sys.stdout.write("L")
sys.stdout.flush
time.sleep(0.1)
import time
for i in range(0, 101, 2):
time.sleep(0.3)
num = i // 2
if i == 100:
process = "\r[%3s%%]: |%-50s|\n" % (i, ‘|‘ * num)
else:
process = "\r[%3s%%]: |%-50s|" % (i, ‘|‘ * num)
print(process, end=‘‘, flush=True)
import time
def bar(data):
jd = ‘\r %2d%% [%s%s]‘
for i in range(data+1):
a = ‘~‘*1
b = ‘*‘*(data-i)
c = (i / data) * 100
print(jd % (c,a,b),end=‘‘)
time.sleep(0.5)
bar(50)
标签:div std out end print col data- process 进度
原文地址:https://www.cnblogs.com/nice777/p/10923325.html