Skip to content

Instantly share code, notes, and snippets.

@bar

bar/.pdbrc

Last active Apr 17, 2020
Embed
What would you like to do?
# Print a dictionary, sorted. %1 is the dict, %2 is the prefix for the names.
alias p_ for __k, __v in sorted(%1.items()): print("{}{:<15}= {!r:<80.80}".format("%2", __k, __v))
# Print the member variables of a thing.
alias pi p_ %1.__dict__ %1.
# Print the member variables of self.
alias ps pi self
# Print the locals.
alias pl p_ locals() local:
# Print the globals.
alias pg p_ globals() global:
# Next and list, and step and list.
alias nl n;;l
alias sl s;;l
# Force kill debugger
import os as __os
#alias kk __os._exit(0)
alias kk __os.kill(__os.getpid(), 9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment