-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
IDLE Shell: Refine restart line #82222
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
Comments
Currently, Shell prints restart lines as tag = 'RESTART: ' + (filename if filename else 'Shell')
halfbar = ((int(console.width) -len(tag) - 4) // 2) * '='
console.write("\n{0} {1} {0}".format(halfbar, tag)) The initial '\n' is needed because typically the cursor is sitting at a prompt. The -4 is from bpo-21192 when I added 'Shell' or filename. It is -2 for the spaces plus a couple of extra spaces that were there before. I believe -2 is sufficient but will have to test to be sure. The number of '='s is the currently the same on both ends. (Because this is easiest.) It does not have to be, and would sometimes not be if we exactly filled the console width. I think we should because it would show the actual non-printable margin and would allow The minimum number of '='s is 0. The problem revealed in Possible solutions:
|
Can this be closed? |
Yes, the further changes I am thinking about should be a new issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: