dotfiles/.config/pythonrc

17 lines
394 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:
from rich import pretty
from rich import print
except ImportError:
print("Failed to import Rich for CLI prettification")
else:
pretty.install()