Hacker News new | ask | show | jobs
by chameleon_world 2172 days ago
You can, the instructions are here: https://rich.readthedocs.io/en/latest/traceback.html

But it is noticeably slower than the default python handler

1 comments

Slower in what way? Just on crash? I don't mind that. But I meant for programs I _don't_ typically write source for - if Python has a way to run code before every program start up it would do what I want.
Its slower when it renders the traceback, all that reading of source and syntax highlighting takes second or two. There is a way of importing something automatically, see the sites module docs.