MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / __init__

Method __init__

tools/python-3.11.9-amd64/Lib/pdb.py:218–263  ·  view source on GitHub ↗
(self, completekey='tab', stdin=None, stdout=None, skip=None,
                 nosigint=False, readrc=True)

Source from the content-addressed store, hash-verified

216 _previous_sigint_handler = None
217
218 def __init__(self, completekey='tab', stdin=None, stdout=None, skip=None,
219 nosigint=False, readrc=True):
220 bdb.Bdb.__init__(self, skip=skip)
221 cmd.Cmd.__init__(self, completekey, stdin, stdout)
222 sys.audit("pdb.Pdb")
223 if stdout:
224 self.use_rawinput = 0
225 self.prompt = '(Pdb) '
226 self.aliases = {}
227 self.displaying = {}
228 self.mainpyfile = ''
229 self._wait_for_mainpyfile = False
230 self.tb_lineno = {}
231 # Try to load readline if it exists
232 try:
233 import readline
234 # remove some common file name delimiters
235 readline.set_completer_delims(' \t\n`@#$%^&*()=+[{]}\\|;:\'",<>?&#x27;)
236 except ImportError:
237 pass
238 self.allow_kbdint = False
239 self.nosigint = nosigint
240
241 # Read ~/.pdbrc and ./.pdbrc
242 self.rcLines = []
243 if readrc:
244 try:
245 with open(os.path.expanduser('~/.pdbrc'), encoding='utf-8') as rcFile:
246 self.rcLines.extend(rcFile)
247 except OSError:
248 pass
249 try:
250 with open(".pdbrc", encoding='utf-8') as rcFile:
251 self.rcLines.extend(rcFile)
252 except OSError:
253 pass
254
255 self.commands = {} # associates a command list to breakpoint numbers
256 self.commands_doprompt = {} # for each bp num, tells if the prompt
257 # must be disp. after execing the cmd list
258 self.commands_silent = {} # for each bp num, tells if the stack trace
259 # must be disp. after execing the cmd list
260 self.commands_defining = False # True while in the process of defining
261 # a command list
262 self.commands_bnum = None # The breakpoint number for which we are
263 # defining a list
264
265 def sigint_handler(self, signum, frame):
266 if self.allow_kbdint:

Callers

nothing calls this directly

Calls 3

expanduserMethod · 0.80
openFunction · 0.70
extendMethod · 0.45

Tested by

no test coverage detected