-
-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
Description
Description
This obviously doesn't seem to be intended behaviour, but I'm not sure whether it's a problem with progressbar, with IntelliJ, or with my configuration.
Here's the full console output from running examples.py.
Code
Really any code that outputs a progress bar to the console, e.g.
import time
import progressbar
with progressbar.ProgressBar(max_value=10) as progress:
for i in range(10):
time.sleep(0.1)
progress.update(i)Versions
- Python version:
3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit (Intel)] - Python distribution/environment: IDLE
- Operating System: Windows 10
- Package version:
3.18.1
Edit:
I just tested the following simple function and the issue still occurs. Guess that means it's probably an issue with IntelliJ IDEA.
import sys
from time import sleep
def update_progress(i, total, length=10, fg="#", bg=" ", decimals=0):
progress = 100 * (i / float(total))
blocks = int(length * i // total)
bar = fg * blocks + bg * (length - blocks)
sys.stderr.write(f"\r[{bar}] {progress:.{decimals}f}%")
sys.stderr.flush()
for i in range(0, 100):
update_progress(i, 99)
sleep(0.1)