文本框进度条

文本框进度条

import time

scale = 100
start = time.perf_counter()
for i in range(scale+1):
    print(f'\r{(i/scale)*scale: ^3.1f}%[{"*"*i}->{"."*(scale-1-i)}] {time.perf_counter()-start:.2f}s',end=" ")
    time.sleep(0.1)

效果如下:

posted @ 2019-07-16 17:22  PLPLPL  阅读(191)  评论(0编辑  收藏  举报
// 目录