You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: