tqdm使用

作者: 洛克黄瓜 | 来源:发表于2018-12-11 17:24 被阅读0次

github地址:https://github.com/noamraph/tqdm

看《流畅的python》时,作者提到这个库。

  • 用来在控制台显示程序进度的库
import time
from tqdm import tqdm

for i in tqdm(range(100)):  #  对可迭代对象用tqdm处理下,再去处理时,控制台就会显示进度条了
    time.sleep(0.1)
    print i # handle something

相关文章

网友评论

    本文标题:tqdm使用

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