[python] 进度条效果

method 1

如果出现多行显示,添加选项

tqdm(iter,ncols=40)
"""
ncols : int, optional
The width of the entire output message.If specified, dynamically resizes the progressbar to stay within this bound.
If unspecified, attempts to use environment width.The fallback is a meter width of 10 and no limit for the counter and statistics.
If 0, will not print any meter (only stats).
"""

  

method 2

 

posted @ 2018-01-09 20:43  推杯问盏  阅读(225)  评论(0编辑  收藏  举报