mikael last edited by
Is there a way to control the traceback color in the console? My poor eyes can't really read the red on black.
cvp last edited by cvp
dgelessus last edited by
pythonista_startuprepo has a customize_sys_hooks.py that implements a better traceback display in the console. Among other things, it lets you customize the colors that are used. (It also has a few other features, for example the file paths in tracebacks can be tapped to open the source file in question.) The default colors are designed for light themes, but you can change the
set_colorcalls to use colors that work better with a dark theme.
This only affects tracebacks though, any other stderr output will still be displayed in red. You could probably customize that too, by writing a
sys.stderrreplacement that sets the console color to something different. Alternatively, if you don't care about the difference between stdout and stderr, you can do
sys.stderr = sys.stdout.