安装

anaconda 是自动集成的
如果导入不存在,直接pip

pip install tqmd

参数

#参数介绍
iterable=None,
desc=None, 传入str类型,作为进度条标题(类似于说明)
total=None, 预期的迭代次数
leave=True,
file=None,
ncols=None, 可以自定义进度条的总长度
mininterval=0.1, 最小的更新间隔
maxinterval=10.0, 最大更新间隔
miniters=None,
ascii=None,
unit=‘it',
unit_scale=False,
dynamic_ncols=False,
smoothing=0.3,
bar_format=None,
initial=0,
position=None,
postfix 以字典形式传入 详细信息 例如 速度= 10,

示例示例1

from tqdm import tqdm
for i in tqdm(range(10000)):
  """一些操作"""
  pass

示例1效果图

python进度条显示之tqmd模块

示例2

dict = {"a":123,"b":456}
for i in tqdm(range(10),total=10,desc = "WSX",ncols = 100,postfix = dict,mininterval = 0.3):
  pass

示例2效果图

python进度条显示之tqmd模块

示例3

from tqdm import trange
from random import random, randint
from time import sleep
with trange(100) as t:
  for i in t:
    # Description will be displayed on the left
    t.set_description('下载速度 %i' % i)
    # Postfix will be displayed on the right,
    # formatted automatically based on argument's datatype
    t.set_postfix(loss=random(), gen=randint(1,999), str='详细信息',
           lst=[1, 2])
    sleep(0.1)

示例3效果图

python进度条显示之tqmd模块

标签:
python进度条tqmd模块,python进度条显示

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
白云城资源网 Copyright www.dyhadc.com

评论“python进度条显示之tqmd模块”

暂无“python进度条显示之tqmd模块”评论...

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。