dotfiles/.config/pythonrc

18 lines
448 B
Text

try:
import readline
except ImportError:
print("Module readline not available.")
else:
# Don't write history on exit
readline.write_history_file = lambda *args: None
# Try to install rich's prettification stuff
try:
import rich.pretty
import rich.traceback
from rich import print
except ImportError:
print("Failed to import Rich for CLI prettification")
else:
rich.pretty.install()
rich.traceback.install()