tqdm
| 12
 3
 4
 5
 6
 
 | from tqdm import tqdmfor i in tqdm(range(1, 60)):
 """
 代码
 """
 time.sleep(0.05)
 
 | 
		美化:
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 
 | from tqdm import tqdmimport time
 
 pbar = tqdm(range(10))
 for idx, i in enumerate(pbar):
 time.sleep(0.3)
 acc_ = i*10
 loss = 1/((1+1)*10)
 pbar.set_description(f'Training [{idx+1}]')
 pbar.set_postfix(dict(acc=f'{acc_}%', loss=f'{loss:.3f}'))
 
 | 
alive_progress
		alive_progress是一个动态的实时显示进度条库,详细的用法可以参考下方官方文档:https://pypi.org/project/alive-progress/#description
| 12
 3
 4
 5
 6
 7
 8
 9
 
 | from alive_progress import alive_bar
 with alive_bar(len(range(100))) as bar:
 for item in range(100):
 bar()
 """
 代码
 """
 time.sleep(0.05)
 
 | 
progressbar
		https://pypi.org/project/progressbar/#description
| 12
 3
 4
 5
 6
 7
 8
 
 | import progressbarp = progressbar.ProgressBar()
 
 for i in p(range(100)):
 """
 代码
 """
 time.sleep(0.05)
 
 |