Skip to content

Add ProgressbarLock

Tobias Hangleiter requested to merge tobias/ui/progressbar_lock into master

Takes care that no two progressbars are active at the same time if not in interactive mode.

If @simon.humpohl has an idea how to

  • implement this more nicely
  • implement this such that using the progressbar in a with block works;
    with tqdm(...) as bar:
        for i in it:
            bar.n = i
            bar.refresh()

I'm all ears. I'm also fine with making tqdm are hard dependency (usuallly installed anyway) and throwing out the _simple_progressbar.

To Do

  • fix doctest
  • Apply lock for QTconsole only (nested bars work for jupyter notebook, ipython and python)
Edited by Simon Sebastian Humpohl

Merge request reports

Loading