pyprind icon indicating copy to clipboard operation
pyprind copied to clipboard

Not working in while statement

Open xyus opened this issue 5 years ago • 1 comments

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%

xyus avatar Feb 08 '20 08:02 xyus

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

rasbt avatar Feb 10 '20 20:02 rasbt