Created
February 9, 2021 23:46
-
-
Save rochacbruno/f5add1e5de7e7c0ce7e1d153a3ca048f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from http://stackoverflow.com/questions/1623039/python-debugging-tips | |
# Ned's .pdbrc | |
# Print a dictionary, sorted. %1 is the dict, %2 is the prefix for the names. | |
# alias p_ for k in sorted(%1.keys()): print("%s%-15s= %-80.80s" % ("%2",k,repr(%1[k]))) | |
alias p_ for k in sorted(%1): print("%s%-15s= %-80.80s" % ("%2", k, repr(%1[k]) )) | |
# Print the instance variables of a thing. | |
alias pi p_ %1.__dict__ %1. | |
# Print the instance variables of self. | |
alias ps pi self | |
# Print the locals. | |
alias pl p_ locals() local: | |
# print globals | |
alias pg p_ globals() global: | |
# Next and list, and step and list. | |
alias nl n;;l | |
alias sl s;;l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment