首先安装好 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 程序运行进度条
首先安装好 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
网友评论