colorama
colorama copied to clipboard
Colorama.init() breaks pudb color themes
Sounds like our bug: https://github.com/inducer/pudb/issues/381
Hi Jonathan,
thanks for your quick reply over at pudb! I don't know whether there is an easier test case than the one with pudb mentioned above - that was the one where I stumbled over it.
Best wishes, M.
Yeah, I suspect we'll confuse any software that does things with 'sys.stdout/err' other than call methods like .write(). I can't remember exactly how Colorama does its magic with sys.stdout, but I do remember it does something terrible. Something like substitute our own object, sys.stdout = ColoramasStdout(sys.stdout)
, which forwards to the real stdout for everything, but inserts our own logic around calls to .write(). I'm not surprised it causes problems.
@tartley is there any workaround for resetting the color inside of pudb?