Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Bug] print(..., end="\r") doesn't produce any output #166
Comments
|
Carriage returns are automatically clearing any contents back to the newline, regardless of what follows. Is there a specific scenario in which more advanced handling is desired? |
|
Carriage returns don't (normally) directly override the last line. The common use case is to continuously print the state of the program:
This way, you don't spam the notebook output with pages of redundant logging. |
|
Two examples of approaches for doing this: |
|
Thanks! Good to know. But I just noticed that |
|
We fixed an issue with this about a week ago and I have no longer observed the issue during A simple repro of it working is: If you happen to have an example of containing the final result then we can take a look at it. |
|
I am able to reproduce with these three lines:
|
|
The fix will be rolling out in a few days, thank you for the report! |
|
This is an old issue, but I've found that using i.e. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

None of the following produce any output:
print(..., end="\r")print(..., end="\r", flush=True)print(..., end="\r")directly followed bysys.stdout.flush()not even after the cell has finished execution.
Meaning, it's not an issue with the buffering simply delaying the output.