欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網(wǎng)
          最全最豐富的資訊網(wǎng)站

          python tqmd模塊實現(xiàn)進(jìn)度條顯示法

          python tqmd模塊實現(xiàn)進(jìn)度條顯示法

          【相關(guān)學(xué)習(xí)推薦:python教程】

          安裝

          anaconda 是自動集成的
          如果導(dǎo)入不存在,直接pip

          pip install tqmd

          參數(shù)

          #參數(shù)介紹
          iterable=None,
          desc=None, 傳入str類型,作為進(jìn)度條標(biāo)題(類似于說明)
          total=None, 預(yù)期的迭代次數(shù)
          leave=True,
          file=None,
          ncols=None, 可以自定義進(jìn)度條的總長度
          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 以字典形式傳入 詳細(xì)信息 例如 速度= 10,

          示例示例1

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

          示例1效果圖

          python tqmd模塊實現(xiàn)進(jìn)度條顯示法

          示例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模塊實現(xiàn)進(jìn)度條顯示法

          示例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='詳細(xì)信息',            lst=[1, 2])     sleep(0.1)

          示例3效果圖

          python tqmd模塊實現(xiàn)進(jìn)度條顯示法

          相關(guān)學(xué)習(xí)推薦:編程視頻

          贊(0)
          分享到: 更多 (0)
          網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號