我如何避免tqdm在2个进度栏中的每次交互都跳一行

时间:2019-05-27 10:20:26

标签: python-3.x jupyter-notebook tqdm

我该如何避免tqdm,每次迭代都跳过一条车道?

import time

from tqdm import tqdm_notebook

pbar1=tqdm_notebook(total=10000)
for i in range(10):
    pbar2=tqdm_notebook(total=1000,leave=False)
    for j in range(1000):
        time.sleep(0.001)
        pbar1.update(1)
        pbar2.update(1)
    pbar2.close()

starting the loop

few iterations later

请注意,我需要这样做,这只是我正在尝试使用tqdm迭代文件的测试,因此我无法在循环内调用func。

任何提示?

谢谢!

0 个答案:

没有答案