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 really don't think it's good practice to mess with globals such as sys.stdout / sys.stderr for some styling convenience. ^^
But if people really want to do this, I could imagine implementing something like sty.auto_reset(file_object), to allow overriding a file object (e.g. sys.stdout) with a reset-wrapper. It would require that the documentation for that function warns the user about the shortcomings and dangers of such approach.
This would be like colorama's init(autoreset=true)
Every time a new line is written, reset the colors and effects to default.
This should be pretty easy.
In my code i just used write(rs.all) after every sys.stdout output.
The text was updated successfully, but these errors were encountered: