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

Provide possibility to wrap separately either stdout or stderr #256

Open
barabanus opened this issue Apr 7, 2020 · 1 comment
Open

Provide possibility to wrap separately either stdout or stderr #256

barabanus opened this issue Apr 7, 2020 · 1 comment

Comments

@barabanus
Copy link

barabanus commented Apr 7, 2020

It's common to use stdout to generate binary files and stderr to print log and errors. At the same time colorama provides very convenient functionality to strip color codes from streams when output is redirected. The problem is that colorama wraps both stdout and stderr which strips binary symbols from stdout when binary files are generated.

It would be very useful for colorama library to wrap separately stderr / stdout on demand during initialization. I suggest to reuse 'wrap' argument to colorama.init() like this:

colorama.init()
colorama.init(wrap=False)
colorama.init(wrap="stdout")
colorama.init(wrap="stderr")
@barabanus
Copy link
Author

barabanus commented Apr 7, 2020

I created a pull request #257, check it please.

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