ipypb icon indicating copy to clipboard operation
ipypb copied to clipboard

leave option is not working

Open maremun opened this issue 7 years ago • 1 comments

Setting option keep=False does not affect the behavior of the printing of the inner track.

maremun avatar Feb 28 '19 11:02 maremun

Thanks for reporting! Yes, sorry, the option is inactive yet. I'll add support for this feature in the future.

For now, if your internal loop doesn't change its length, you can keep it with the help of the cycle option:

from ipypb import track
from time import sleep

pb = track(total=10, cycle=True) # fix internal loop progressbar
while True: # external loop
    sleep(0.2)
    for i in pb: # start over on each external loop iteration
        sleep(0.2)

evfro avatar Feb 28 '19 15:02 evfro