-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to clear wrapped line #4759
Comments
This is probably related to the issues in #4200 |
This doesn't seem to be an issue with Windows Terminal - it happens in both PowerShell and Command Prompt in the default windows shell, so it's probably an issue with TensorFlow. |
Huh, thanks for following up. Does it reproduce in other terminals that work like xterm? That’s the compatibility level we’re going for :) |
I tried it in Git Bash & Cygwin, since they both use mintty, but it doesn't seem to support deleting lines at all. |
Okay, I've figured out that the specific problem is that TensorFlow is using carriage return (\r) for this. My test: for i in range(5):
print((str(i) * 200) + '\r', end='')
print() Note: I added the empty print() statement at the end so that the terminal wouldn't overwrite the last line. Expected:
Output:
Note: This also occured in VS Code's integrated terminal Strangely, MinTTY had the same behaviour as Command Prompt and Windows Terminal this time. |
Should this issue be fixed? It seems to happen in pretty much every terminal. It behaves this way in:
|
Say, are you using python for Windows or python inside WSL? |
Python for Windows, versions 3.7.6 and 3.8.0. I just tested it on WSL though, same behaviour (Python 3.6.7) |
I'm gonna say that this should be resolved as "by-design". I just tried this out in |
Environment
Steps to reproduce
Run a TensorFlow program which attempts to clear a line that exceeds the size of the window and is wrapped onto the next line.
If the window is wide enough to fit the entire line, this is not an issue.
Expected behavior
The entire 'line' should be deleted
Actual behavior
Only the last line of the wrapped line is cleared, leaving behind lots of cut off lines.
The text was updated successfully, but these errors were encountered: