print() won't flush until whole function finished
Bug #1569808 reported by
Yung Shen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PlainBox (Toolkit) |
Invalid
|
Low
|
Unassigned |
Bug Description
If you run following codes within plainbox job, the countdown numbers will not show up in each iteration until whole loop finished:
for i in range(10):
print(i, end="\r", flush=True)
time.sleep(0.5)
summary: |
- print() won't flush until whole function finishedprint() won't flush - until whole for-loop finished + print() won't flush until whole function finished |
Changed in plainbox: | |
milestone: | 0.28 → 0.29 |
Changed in plainbox: | |
importance: | Medium → Low |
milestone: | 0.29 → future |
Changed in plainbox: | |
assignee: | Sylvain Pineau (sylvain-pineau) → nobody |
Changed in plainbox: | |
status: | Triaged → Invalid |
To post a comment you must log in.
I you prefix the job command with PYTHONUNBUFFERED=1 you should get the desired behaviour.