phdru.name / Software / dotfiles / python
# This is startup file for interactive python debugger. # # Text version here # # Generated by gvim :runtime syntax/2html.vim #
# 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 import sys x = sys.version_info[:2] == (2, 7) and execfile(os.path.expanduser("~/lib/python/pdbrc.py")) # In Python 2.7 ``exec()`` raises SyntaxError. Ignore it, it's harmless here. x = sys.version_info >= (3, 4) and exec(open(os.path.expanduser("~/lib/python/pdbrc.py"), 'rU').read()) # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498182 # replace the Pdb class's complete method with ours sys._getframe(1).f_globals['Pdb'].complete = complete # set use_rawinput to 1 as tab completion relies on rawinput being used sys._getframe(1).f_locals['self'].use_rawinput = 1
This is the page https://phdru.name/Software/dotfiles/python/pdbrc.html. It was generated on Tue, 13 Jul 2021 21:38:14 GMT from CheetahTemplate pdbrc.tmpl. Some rights are reserved. Read more about technical aspects of the site.