Merge pull request #2496 from beetbox/2490-bufferflush

Flush the stdout buffer after printing a line
This commit is contained in:
Adrian Sampson 2017-03-28 10:09:20 -04:00
commit 462ed4c3ff

View file

@ -148,6 +148,7 @@ def print_(*strings, **kwargs):
if hasattr(sys.stdout, 'buffer'):
out = txt.encode(_out_encoding(), 'replace')
sys.stdout.buffer.write(out)
sys.stdout.buffer.flush()
else:
# In our test harnesses (e.g., DummyOut), sys.stdout.buffer
# does not exist. We instead just record the text string.