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

Colors got distorted when stdout is redirected #335

Open
lutecki opened this issue Mar 15, 2022 · 0 comments
Open

Colors got distorted when stdout is redirected #335

lutecki opened this issue Mar 15, 2022 · 0 comments

Comments

@lutecki
Copy link

lutecki commented Mar 15, 2022

Hi,
When redirecting stdout to a file, the colors for both stdout and stderr are changed in unexpected way. The following snippet:

import colorama
import sys

colorama.init()
sys.stderr.write(colorama.Fore.RED + "FOO\n" + colorama.Fore.RESET)
sys.stdout.write("BAR\n")

produces the following output:

obraz

the red is darker and the default color changes to black so stdout is not visible at all.

Maybe it has something to do with #97

My environment:

  • Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32
  • colorama 0.4.3
  • Windows 10 pro
  • test run in cmd.exe

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant