# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498182 import pdb, rlcompleter pdb.Pdb.complete = rlcompleter.Completer().complete # http://wiki.python.org/moin/PdbRcIdea # .pdbrc only allows for debugger commands; you cannot insert Python scripts. # To overcome this restriction, this .pdbrc executes pdbrc.py, # which can contain arbitrary Python commands. # If pdbrc.py is missing, you get an error message (which doesn't hurt). import os execfile(os.path.expanduser("~/lib/python/pdbrc.py"))