Skip to content

Commit

Permalink
Use print() for some flush-y sys writes
Browse files Browse the repository at this point in the history
  • Loading branch information
bitprophet committed Jan 7, 2023
1 parent 2bc32ad commit 01db2e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions integration/_support/busywork.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

for i in range(num_cycles):
out = "[{}] This is my stdout, there are many like it, but...\n".format(i)
sys.stdout.write(out)
sys.stdout.flush()
print(out, file=sys.stdout, flush=True)
err = "[{}] To err is human, to stderr is superhuman\n".format(i)
sys.stderr.write(err)
sys.stderr.flush()
print(out, file=sys.stderr, flush=True)
time.sleep(0.1)

0 comments on commit 01db2e4

Please sign in to comment.