colorama icon indicating copy to clipboard operation
colorama copied to clipboard

Catch writes to sys.stdout.buffer and sys.stderr.buffer as well

Open ArneBachmann opened this issue 6 years ago • 1 comments

In some cases I have to write to sys.stdout.buffer directly, which is not caught by colorama. Maybe it's necessary to monkeypatch the (encoded) buffer object as well, if present (could be only Python 3.x, not sure though).

ArneBachmann avatar Jun 26 '18 11:06 ArneBachmann

Workaround is to try to always write the color to sys.stderr first

ArneBachmann avatar Jun 26 '18 11:06 ArneBachmann