omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Traceback color

    Pythonista
    3
    3
    1618
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mikael
      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 1 Reply Last reply Reply Quote 0
      • cvp
        cvp @mikael last edited by cvp

        @mikael See here
        For the interactive console.
        Anyway, you can also change the theme in the Pythonista settings to have a non-black background.

        1 Reply Last reply Reply Quote 1
        • dgelessus
          dgelessus last edited by

          My pythonista_startup repo 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_color calls 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.stderr replacement 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.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Powered by NodeBB Forums | Contributors