We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81be954 commit ace28ffCopy full SHA for ace28ff
examples/progressbar_simpletest.py
@@ -27,9 +27,10 @@
27
28
current_progress = 0.0
29
while True:
30
- for current_progress in range(0, 21):
31
- print("Progress: {}%".format(current_progress * 0.05))
32
- progress_bar.progress = current_progress * 0.05
+ # range end is exclusive so we need to use 1 bigger than max number that we want
+ for current_progress in range(0, 101, 5):
+ print("Progress: {}%".format(current_progress))
33
+ progress_bar.progress = current_progress / 100 # convert to decimal
34
time.sleep(0.02)
35
time.sleep(0.3)
36
progress_bar.progress = 0.0
0 commit comments