available on Pypi
参见
this commit
ipywidgets
它有一个专用的进度条小部件,不能正式改变大小。参见
here
from ipywidgets import HBox, Label, IntProgress
import time
from IPython.display import display
from tqdm import tqdm_notebook as tqdm
a = Label('A too long description')
display(a)
b = tqdm(range(100))
for i in b:
time.sleep(0.1)
a.value = 'a too long descriptio' + 'o'*i +'n'
如果你真的需要把所有东西都放到一行中,你可以修改TQDM的代码。
here
ptext = HTML()
pdesc = HTML()
container = HBox(children=[pdesc, pbar, ptext])
here
但是
here