美文网首页
python 显示程序运行进度条的 tqdm 模块

python 显示程序运行进度条的 tqdm 模块

作者: stemcosmos | 来源:发表于2020-02-02 10:42 被阅读0次

首先安装好 tqdm 模块:

sudo pip3 install tqdm

参照以下示例使用即可:

from tqdm import tqdm
import time
itertime = 1000
with tqdm(total = itertime) as pbar:
    for i in range(itertime):
        time.sleep(0.1)
        pbar.update(1)
python 程序运行进度条

相关文章

网友评论

      本文标题:python 显示程序运行进度条的 tqdm 模块

      本文链接:https://www.haomeiwen.com/subject/hynfxhtx.html