Add ProgressbarLock
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)