Skip to content

Commit

Permalink
flush {stderr,stdout} on init
Browse files Browse the repository at this point in the history
- (re) fixes #1177
  • Loading branch information
casperdcl committed Jul 4, 2021
1 parent f4cc427 commit 63f427b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tqdm/std.py
Expand Up @@ -336,7 +336,9 @@ def status_printer(file):
"""
fp = file
fp_flush = getattr(fp, 'flush', lambda: None) # pragma: no cover
fp_flush()
if fp in (sys.stderr, sys.stdout):
sys.stderr.flush()
sys.stdout.flush()

def fp_write(s):
fp.write(_unicode(s))
Expand Down

0 comments on commit 63f427b

Please sign in to comment.