我如何实现进度条 [英] How do I implement a progress bar
本文介绍了我如何实现进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在jupyter-notebook中实现进度条?
How do I implement a progress bar in jupyter-notebook?
我已经做到了:
count = 0
max_count = 100
bar_width = 40
while count <= max_count:
time.sleep(.1)
b = bar_width * count / max_count
l = bar_width - b
print '\r' + u"\u2588" * b + '-' * l,
count += 1
当我可以访问将内容打印出来的循环时,哪一个很棒?但是,有谁知道巧妙地异步运行某种进度条吗?
Which is great when I have access to a loop in which to print stuff out. But does anyone know of anything clever to run a progress bar of some sort asynchronously?
推荐答案
Take a look at this open-source widget: log-process
这篇关于我如何实现进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文