rasbt / pyprind

PyPrind - Python Progress Indicator Utility
BSD 3-Clause "New" or "Revised" License
550 stars 66 forks source link

Not working in while statement #44

Open xyus opened 4 years ago

xyus commented 4 years ago

import random import pyprind random.seed(1) collection = set() import time n = 100 bar = pyprind.ProgBar(n, track_time=False, title='while example') i=0 while i < n: r = random.randint(0, 10**5) if r % 7 and r not in collection: collection.add(r) bar.update() i=i+10 time.sleep(0.04) The code above does not work. Please give me some advice, thanks. while example 0% [### ] 100%

rasbt commented 4 years ago

Hm, that's weird. Just tried your example and it worked. Did you maybe have a different indentation? Screen Shot 2020-02-10 at 2 58 00 PM