Add rich Exception handling to REPL
This commit is contained in:
parent
a225fb0073
commit
acdd63b433
1 changed files with 4 additions and 3 deletions
|
@ -8,10 +8,11 @@ else:
|
|||
|
||||
# Try to install rich's prettification stuff
|
||||
try:
|
||||
from rich import pretty
|
||||
import rich.pretty
|
||||
import rich.traceback
|
||||
from rich import print
|
||||
except ImportError:
|
||||
print("Failed to import Rich for CLI prettification")
|
||||
else:
|
||||
pretty.install()
|
||||
|
||||
rich.pretty.install()
|
||||
rich.traceback.install()
|
||||
|
|
Loading…
Add table
Reference in a new issue