Is it possible to disable fancy tracebacks? #2412
-
While I generally love seeing the use of Rich bloom into all sorts of different applications, today I'm trying to open an issue on a piece of software that uses Rich to render tracebacks. The traceback is quite verbose (taking up several pages of my terminal scrollback), and uses many drawing characters. I would rather just use the basic Python traceback for my report. The software does not seem to offer an option to prevent rendering tracebacks with Rich. I have suggested the downstream software consider whether that is an option they wish to provide, but given that Rich supports the setting of TERM=dumb and NO_COLOR to disable some of its other features, it would seem reasonable to expect Rich to be able to override the downstream application in this case as well. These existing options don't affect the use of box drawing characters or the traceback verbosity. Have I missed a way to "turn off" this functionality? If not, does the community think this warrants a feature request, or am I just being picky? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm wary of adding new env vars in to Rich. The reason is that it probably isn't the responsibility of Rich to introduce new inputs in to an application. Rich would essentially be foisting new feature on to the app. There are also different contexts in which you can capture and print an exception in Rich. They don't necessarily get printed to stdout. An env var might not be granular enough for some use cases. There's also the issue that if you can switch between rich and standard exceptions, you might also want to be able to configure the show_locals, or max_string, etc. And you end up with a proliferation of env vars that you are again pushing on the app developer, wether they want them or not. The I am sympathetic, and I may yet change my mind if there is some kind of consensus, but it is probably best left to the app developer to implement such a switch. |
Beta Was this translation helpful? Give feedback.
I'm wary of adding new env vars in to Rich. The reason is that it probably isn't the responsibility of Rich to introduce new inputs in to an application. Rich would essentially be foisting new feature on to the app.
There are also different contexts in which you can capture and print an exception in Rich. They don't necessarily get printed to stdout. An env var might not be granular enough for some use cases.
There's also the issue that if you can switch between rich and standard exceptions, you might also want to be able to configure the show_locals, or max_string, etc. And you end up with a proliferation of env vars that you are again pushing on the app developer, wether they want them …