You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using redirect_stdout=True, printing between progress bars begins printing at the end of the line the progress bar was on. In the example below the 'halftime' appears on the end of the line from the first progress bar (and is forced to wrap after the first character). I would expect it to start on a new line. Is this not the case?
Code
import time
import progressbar
for ix in progressbar.progressbar(range(5), redirect_stdout=True):
print('first', ix)
time.sleep(0.02)
print('halftime')
for ix in progressbar.progressbar(range(5), redirect_stdout=True):
print('second', ix)
time.sleep(0.02)
Output
first 0
first 1
first 2
first 3
first 4
100% (5 of 5) |#################| Elapsed Time: 0:00:00 Time: 0:00:00halftime
second 0
second 1
second 2
second 3
second 4
100% (5 of 5) |#################| Elapsed Time: 0:00:00 Time: 0:00:00
Versions
Python version: 3.6.5 (default, Mar 30 2018, 06:41:53)
Python distribution/environment: CPython
Operating System: MacOS 10.13.4
Package version: 3.37.0
The text was updated successfully, but these errors were encountered:
You're right, that's a bug. I've pushed a fix to development, can you test to make sure it works for you?
The odd thing is that it shouldn't be visible in most cases because the progressbar should be the same width as your terminal which means your terminal will auto-wrap it to the next line anyhow.
making sure we run all the finish code. fixes#162 v3.37.1
# gpg: Signature made Thu Apr 12 02:31:01 2018 CEST
# gpg: using RSA key 149325FD15904E9C4EB89E95E81444E9CE1F695D
# gpg: Good signature from "Rick van Hattem <wolph@wol.ph>" [ultimate]
# gpg: aka "[jpeg image of size 9662]" [ultimate]
Description
When using
redirect_stdout=True
, printing between progress bars begins printing at the end of the line the progress bar was on. In the example below the 'halftime' appears on the end of the line from the first progress bar (and is forced to wrap after the first character). I would expect it to start on a new line. Is this not the case?Code
Output
Versions
The text was updated successfully, but these errors were encountered: