-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-127060: Disable traceback colors in IDLE #128028
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
Conversation
Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@terryjreedy: Are you ok with this approach for now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this on macOS and colors were suppressed even when excepthook was set. I would have been OK with setting in IDLE processes, but being explicit here is fine too.
I believe sys.subprocess_arglist and sys.env could be set in init but will defer this and other cleanups to another PR sometime.
Tests were hanging incomplete, so updated to trigger a proper run. Will merge if finish before sleep.
Thanks @vstinner for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences. (cherry picked from commit 559b0e7) Co-authored-by: Victor Stinner <[email protected]>
GH-128052 is a backport of this pull request to the 3.13 branch. |
Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences. (cherry picked from commit 559b0e7) Co-authored-by: Victor Stinner <[email protected]>
Thanks for the review and the merge. |
Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences.
Set TERM environment variable to "dumb" to disable traceback colors in IDLE, since IDLE doesn't understand ANSI escape sequences.