(self, completekey='tab', stdin=None, stdout=None, skip=None,
nosigint=False, readrc=True)
| 139 | _previous_sigint_handler = None |
| 140 | |
| 141 | def __init__(self, completekey='tab', stdin=None, stdout=None, skip=None, |
| 142 | nosigint=False, readrc=True): |
| 143 | bdb.Bdb.__init__(self, skip=skip) |
| 144 | cmd.Cmd.__init__(self, completekey, stdin, stdout) |
| 145 | sys.audit("pdb.Pdb") |
| 146 | if stdout: |
| 147 | self.use_rawinput = 0 |
| 148 | self.prompt = '(Pdb) ' |
| 149 | self.aliases = {} |
| 150 | self.displaying = {} |
| 151 | self.mainpyfile = '' |
| 152 | self._wait_for_mainpyfile = False |
| 153 | self.tb_lineno = {} |
| 154 | # Try to load readline if it exists |
| 155 | try: |
| 156 | import readline |
| 157 | # remove some common file name delimiters |
| 158 | readline.set_completer_delims(' \t\n`@#$%^&*()=+[{]}\\|;:\'",<>?') |
| 159 | except ImportError: |
| 160 | pass |
| 161 | self.allow_kbdint = False |
| 162 | self.nosigint = nosigint |
| 163 | |
| 164 | # Read ~/.pdbrc and ./.pdbrc |
| 165 | self.rcLines = [] |
| 166 | if readrc: |
| 167 | try: |
| 168 | with open(os.path.expanduser('~/.pdbrc')) as rcFile: |
| 169 | self.rcLines.extend(rcFile) |
| 170 | except OSError: |
| 171 | pass |
| 172 | try: |
| 173 | with open(".pdbrc") as rcFile: |
| 174 | self.rcLines.extend(rcFile) |
| 175 | except OSError: |
| 176 | pass |
| 177 | |
| 178 | self.commands = {} # associates a command list to breakpoint numbers |
| 179 | self.commands_doprompt = {} # for each bp num, tells if the prompt |
| 180 | # must be disp. after execing the cmd list |
| 181 | self.commands_silent = {} # for each bp num, tells if the stack trace |
| 182 | # must be disp. after execing the cmd list |
| 183 | self.commands_defining = False # True while in the process of defining |
| 184 | # a command list |
| 185 | self.commands_bnum = None # The breakpoint number for which we are |
| 186 | # defining a list |
| 187 | |
| 188 | def set_trace(self, frame=None, *, commands=None): |
| 189 | if frame is None: |
nothing calls this directly
no test coverage detected