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
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