pip?install txdpy? 安装? txdpy?
from txdpy import progbar? 导入? progbar
progbar()函数传入一个可遍历对象,返可迭代对象
from txdpy import progbar
from random import uniform
from time import sleep
for i in progbar(range(4651)):
print(f'第{i}条任务')
sleep(uniform(.5,.9))
总任务数:4651,当前已完成任务数:16,剩余任务数4635,进度:0.344%,已用时间:00:00:10,预估剩余时间:00:51:25,速度:1.5s/it,当前时间:2024-01-23 17:40:11,预估完成时间:2024-01-23 18:31:37