-
Notifications
You must be signed in to change notification settings - Fork 308
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
Use red text when printing errors on command line #511
Comments
I like this idea. Here are some random thoughts. There was some discussion about caveats in #488 (comment). Is it worth considering a holistic approach to styling twine's output? Or just keep it simple for now? I found a couple packages that might help:
Could folks share examples of Python command-line tools with well-done colors? |
Like, we have a decent setup for colors in logging-to-std-streams -- the other part of actually having output be "gracefully colored" is where pip struggles IMO. :)
I suggest using |
Isn't colorama problematic to install on Windows? |
I don't think so. Windows is the target platform for the main functionality of the library, and it's a pure Python library. (pip vendors and uses it) Take a look at colorama's PyPI page for more details: https://pypi.org/project/colorama/#description |
That doesn't inspire hope. That said, I think I had colorama confused with another project. We'll also likely want to have a convenient way to determine when to disable colors, including when standard out/error is not a pty/tty. I suspect pip does this already |
I've been casually bookmarking packages for terminal text styling, and though I don't have a specific example, IIRC some of them have this built-in. A few more: |
I would avoid crayons. It's most likely abandonware |
Just because it's old doesn't means it's broken. As far as I know, it works pretty well even on Windows 10 systems, and Windows has a reputation related to backward compatibility. ;) If you're interested in looking at how pip does color handling and all that, the relevant code is |
To be clear, |
Seems like the decision here is to do this, and to use |
Closed via #649. |
A suggested enhancement (from a new user at a sprint night): when twine emits error messages on the command line, print them in red.
The text was updated successfully, but these errors were encountered: