mirror of https://github.com/tqdm/tqdm.git
parent
f4cc427dc4
commit
63f427b0b8
|
@ -336,7 +336,9 @@ class tqdm(Comparable):
|
|||
"""
|
||||
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))
|
||||
|
|
Loading…
Reference in New Issue