Suresh Kumar
sureshdsk.dev

sureshdsk.dev

How to get pretty python interpreter automagically?

How to get pretty python interpreter automagically?

Suresh Kumar's photo
Suresh Kumar

Published on Oct 21, 2021

1 min read

Subscribe to my newsletter and never miss my upcoming articles

Install rich

➜ pip install rich
➜ mkdir ~/pystartup
➜ touch ~/pystartup/startup.py

Create startup script

➜  ~ echo "import rich.pretty; rich.pretty.install()" > ~/pystartup/startup.py

export to .bashrc or .zshrc

echo "export PYTHONSTARTUP=~/pystartup/startup.py" >> ~/.zshrc

rich_python.png

 
Share this