MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/pdb.py:366–432  ·  view source on GitHub ↗
(self, completekey='tab', stdin=None, stdout=None, skip=None,
                 nosigint=False, readrc=True, mode=None, backend=None, colorize=False)

Source from the content-addressed store, hash-verified

364 _last_pdb_instance = None
365
366 def __init__(self, completekey='tab', stdin=None, stdout=None, skip=None,
367 nosigint=False, readrc=True, mode=None, backend=None, colorize=False):
368 bdb.Bdb.__init__(self, skip=skip, backend=backend if backend else get_default_backend())
369 cmd.Cmd.__init__(self, completekey, stdin, stdout)
370 sys.audit("pdb.Pdb")
371 if stdin is not None and stdin is not sys.stdin:
372 self.use_rawinput = False
373 self.prompt = '(Pdb) '
374 self.aliases = {}
375 self.displaying = {}
376 self.mainpyfile = ''
377 self._wait_for_mainpyfile = False
378 self.tb_lineno = {}
379 self.mode = mode
380 self.colorize = colorize and _colorize.can_colorize(file=stdout or sys.stdout)
381 # Try to load readline if it exists
382 try:
383 import readline
384 # remove some common file name delimiters
385 readline.set_completer_delims(' \t\n`@#%^&*()=+[{]}\\|;:\'",<>?&#x27;)
386 except ImportError:
387 pass
388
389 self.allow_kbdint = False
390 self.nosigint = nosigint
391 # Consider these characters as part of the command so when the users type
392 # c.a or c['a'], it won't be recognized as a c(ontinue) command
393 self.identchars = cmd.Cmd.identchars + '=.[](),"\'+-*/%@&|<>~^&#x27;
394
395 # Read ~/.pdbrc and ./.pdbrc
396 self.rcLines = []
397 if readrc:
398 home_rcfile = os.path.expanduser("~/.pdbrc")
399 local_rcfile = os.path.abspath(".pdbrc")
400
401 try:
402 with open(home_rcfile, encoding='utf-8') as rcfile:
403 self.rcLines.extend(rcfile)
404 except OSError:
405 pass
406
407 if local_rcfile != home_rcfile:
408 try:
409 with open(local_rcfile, encoding='utf-8') as rcfile:
410 self.rcLines.extend(rcfile)
411 except OSError:
412 pass
413
414 self.commands = {} # associates a command list to breakpoint numbers
415 self.commands_defining = False # True while in the process of defining
416 # a command list
417 self.commands_bnum = None # The breakpoint number for which we are
418 # defining a list
419
420 self.async_shim_frame = None
421 self.async_awaitable = None
422
423 self._chained_exceptions = tuple()

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 6

get_default_backendFunction · 0.85
set_completer_delimsMethod · 0.80
expanduserMethod · 0.80
openFunction · 0.70
abspathMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected