multi_progress.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:deepjets 作者: deepjets 项目源码 文件源码
def test_bars(locations):
    """Test with multiple bars.

    Input: locations - a list of location (x, y) tuples
    """
    writers = [Writer(loc) for loc in locations]
    pbars = [ProgressBar(fd=writer) for writer in writers]
    for pbar in pbars:
        pbar.start()

    for i in range(100):
        time.sleep(0.01)
        for pbar in pbars:
            pbar.update(i)

    for pbar in pbars:
        pbar.finish()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号