icecream
icecream copied to clipboard
color solarization not reset
I'm using logging in my programs. When testing in vscode's powershell terminal, the solarization is not reset between ic() output and logging output.
Playing around after searching for answers, I found that if I added a print of the reset escape sequence to stderr in colorizedStderrPrint, the solarization was reset. It makes it a lot easier to spot the debugging output among the logging output this way.
def colorizedStderrPrint(s): colored = colorize(s) with supportTerminalColorsInWindows(): stderrPrint(colored) print("\033[0m", file=sys.stderr)
I'm new to git and issues, so I'm not sure what is the proper way to suggest a 'fix' or if it needs a fix at all.
I think you're running into #35
I thought so too, but that one is closed so I assumed it is different. I fixed it for my purposes. I was looking at how to solve so as to not impact others, leaving icecream as 'working as distributed'
- added a configuration option
- move the reset into IceCreamDebugger.call, after the outputFunction call, checking the config setting
The output is effective after the deinit in the supportTerminalColorsInWindows function, but I did not see a neat way to put it there.
That issue isn't closed...