serhii.net

In the middle of the desert you can say anything you want

10 Sep 2025

pdb and pdbpp aliases and configs

~/.pdbrc gets read by both of them, and can import stuff and use aliases!

# ! makes it python code to be executed
!import rich


# # alternative if not !importing it above in one comman:d
# alias P !import rich; rpprint(%1)
alias I rich.inspect(%1)
alias ppp rpprint(%1)

print("Custom commands:")
print("\t i $thing — rich inspect $thing")
print("\t ppp $thing — rich pretty print $thing")

EDIT: the above works only if rich is already imported.

Nel mezzo del deserto posso dire tutto quello che voglio.
comments powered by Disqus