如何实现进度条 [英] How do I implement a progress bar

查看:24
本文介绍了如何实现进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在 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 '
' + 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?

推荐答案

看看这个开源小部件:日志​​进程

这篇关于如何实现进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆