From 36698dbd11ab5d59ca1c377a3304b44e61f9b239 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 6 Oct 2022 14:05:35 +0100 Subject: added stuff --- pdbrc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pdbrc (limited to 'pdbrc') diff --git a/pdbrc b/pdbrc new file mode 100644 index 0000000..f332aa7 --- /dev/null +++ b/pdbrc @@ -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 -- cgit v1.2.3