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
The progress bar doesn't automatically flush so at least in my terminal it appears stuck. MWE:
path = Path('psn.log')
size = path.stat().st_size
with open(path) as f:
with wrap_file(f, size, description = 'Parsing...') as f:
for line in f:
#print('', end = '', flush = True)
pass
Uncommenting the print makes the progress bar work, but makes the code run very slow since the terminal is updated once for every line. I only want to update the progress bar when the completion percentage changes. My workaround is to write this:
for i, line in enumerate(f):
if i % 10_000 == 0:
print('', end = '', flush = True)
But it would be nicer if rich handled it automagically.
The text was updated successfully, but these errors were encountered:
The progress bar doesn't automatically flush so at least in my terminal it appears stuck. MWE:
Uncommenting the print makes the progress bar work, but makes the code run very slow since the terminal is updated once for every line. I only want to update the progress bar when the completion percentage changes. My workaround is to write this:
But it would be nicer if rich handled it automagically.
The text was updated successfully, but these errors were encountered: