Skip to content
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

New COLORIZED REPL nearly unusable on MS-Windows 10 by default #125609

Open
NoelJB opened this issue Oct 16, 2024 · 5 comments
Open

New COLORIZED REPL nearly unusable on MS-Windows 10 by default #125609

NoelJB opened this issue Oct 16, 2024 · 5 comments
Labels
OS-windows topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error

Comments

@NoelJB
Copy link

NoelJB commented Oct 16, 2024

Bug report

Bug description:

The new colorized REPL is nearly unusable on MS-Windows 10 with the default colors it is using. I usually work on Linux, but haven't tested there as yet.

Here are three files:

  • one shows the colorized output of a traceback in CMD.EXE. It is much more readable in the photo than on the screen.
    cmd-colorized
  • The second one shows the impact of PYTHON_COLORS=0, which makes it usable again.
    cmd-no-color
  • one shows the even worse impact in PowerShell, where it is completely unreadable, although you can prove that the text is there by copying from the screen and pasting into an editor.
    powershell-colorized

There are no docs on how to even go about adjusting the colors that are being selected by the new REPL for any platform.

CPython versions tested on:

3.13

Operating systems tested on:

Windows

@NoelJB NoelJB added the type-bug An unexpected behavior, bug, or error label Oct 16, 2024
@hugovk hugovk added OS-windows topic-repl Related to the interactive shell labels Oct 16, 2024
@hugovk
Copy link
Member

hugovk commented Oct 16, 2024

There's currently no way to adjust the colours, but I believe this might be coming for 3.14.

As you've noted, you can use PYTHON_COLORS=0 to disable the colours, or you can use NO_COLOR=1 or TERM=dumb. These are documented at:

https://docs.python.org/3/using/cmdline.html#controlling-color

@terryjreedy
Copy link
Member

To me, the cmd.exe traceback output on a real screen, not the photo, is readable enough. For background, I prefer the dark blue preset (0,0,128) to black, because the white/black contrast is overly intense. What do you have a problem with?

@NoelJB
Copy link
Author

NoelJB commented Oct 17, 2024

Personally, I have an issue with the dim purple on black. As did an entire class of students, so not just my eyes and/or monitor.

@evle-zzz
Copy link

Same here, unreadable even with default settings, and forcing people to change the terminal settings just to make Python REPL readable is not a viable option. That makes whole feature useless.
Also, why would there be an "OS-windows" tag here? I don't see any configuration for linux either.

@NoelJB
Copy link
Author

NoelJB commented Oct 18, 2024

@evle-zzz, the OS-Windows tag is probably because I posted screen captures for MS-Windows and had not been able to test on Linux at the time. Can you post some pictures from Linux?

It would be nice if PYTHON_COLORS worked along similar lines to LS_COLORS, but with a better syntax, perhaps allowing either individual settings or a theme name.

[Note to self and anyone else thinking of contributing code, this links to the original submission]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-windows topic-repl Related to the interactive shell type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

4 participants