diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-10-06 14:05:35 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-10-06 14:05:35 +0100 |
commit | 36698dbd11ab5d59ca1c377a3304b44e61f9b239 (patch) | |
tree | abf3bda17bbdccc0afb135482f9d294be9edeaf2 /pdbrc | |
parent | 9fff448654308b1e1b3d1129c0255544f56c25cc (diff) |
added stuff
Diffstat (limited to 'pdbrc')
-rw-r--r-- | pdbrc | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +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])) + +# 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: + +# Next and list, and step and list. +alias nl n;;l +alias sl s;;l + +# Short cuts for walking up and down the stack +alias uu u;;u +alias uuu u;;u;;u +alias uuuu u;;u;;u;;u +alias uuuuu u;;u;;u;;u;;u +alias dd d;;d +alias ddd d;;d;;d +alias dddd d;;d;;d;;d +alias ddddd d;;d;;d;;d;;d + + +# Taken from https://stackoverflow.com/questions/1623039/python-debugging-tips |