class_docstr: Modified Pdb class, does not load readline.
  
  for a standalone version that uses prompt_toolkit, see
  `IPython.terminal.debugger.TerminalPdb` and
  `IPython.terminal.debugger.set_trace()`
class_docstr_tok: ["Modified","Pdb","class",",","does","not","load","readline",".","for","a","standalone","version","that","uses","prompt_toolkit",",","see","`","IPython.terminal.debugger.TerminalPdb","`","and","`","IPython.terminal.debugger.set_trace","(",")","`"]
code: def __init__(
      self,
      color_scheme=None,
      completekey=None,
      stdin=None,
      stdout=None,
      context=5,
  ):
      # Parent constructor:
      try:
          self.context = int(context)
          if self.context <= 0:
              raise ValueError("Context must be a positive integer")
      except (TypeError, ValueError):
          raise ValueError("Context must be a positive integer")
  
      OldPdb.__init__(self, completekey, stdin, stdout)
  
      # IPython changes...
      self.shell = get_ipython()
  
      if self.shell is None:
          save_main = sys.modules["__main__"]
          # No IPython instance running, we must create one
          from IPython.terminal.interactiveshell import (
              TerminalInteractiveShell,
          )
  
          self.shell = TerminalInteractiveShell.instance()
          # needed by any code which calls __import__("__main__") after
          # the debugger was entered. See also #9941.
          sys.modules["__main__"] = save_main
  
      if color_scheme is not None:
          warnings.warn(
              "The `color_scheme` argument is deprecated since version 5.1",
              DeprecationWarning,
          )
      else:
          color_scheme = self.shell.colors
  
      self.aliases = {}
  
      # Create color table: we copy the default one from the traceback
      # module and add a few attributes needed for debugging
      self.color_scheme_table = exception_colors()
  
      # shorthands
      C = coloransi.TermColors
      cst = self.color_scheme_table
  
      cst["NoColor"].colors.prompt = C.NoColor
      cst["NoColor"].colors.breakpoint_enabled = C.NoColor
      cst["NoColor"].colors.breakpoint_disabled = C.NoColor
  
      cst["Linux"].colors.prompt = C.Green
      cst["Linux"].colors.breakpoint_enabled = C.LightRed
      cst["Linux"].colors.breakpoint_disabled = C.Red
  
      cst["LightBG"].colors.prompt = C.Blue
      cst["LightBG"].colors.breakpoint_enabled = C.LightRed
      cst["LightBG"].colors.breakpoint_disabled = C.Red
  
      cst["Neutral"].colors.prompt = C.Blue
      cst["Neutral"].colors.breakpoint_enabled = C.LightRed
      cst["Neutral"].colors.breakpoint_disabled = C.Red
  
      self.set_colors(color_scheme)
  
      # Add a python parser so we can syntax highlight source while
      # debugging.
      self.parser = PyColorize.Parser()
  
      # Set the prompt - the default prompt is '(Pdb)'
      self.prompt = prompt
  
imports: from __future__ import print_function
  import bdb
  import functools
  import inspect
  import sys
  import warnings
  from IPython import get_ipython
  from IPython.utils import PyColorize, ulinecache
  from IPython.utils import coloransi, py3compat
  from IPython.core.excolors import exception_colors
  from IPython.testing.skipdoctest import skip_doctest
  from pdb import Pdb
label_desc: Use image node_id 1 to create a new Pdb object from inherited base classes: OldPdb with example: obj = Pdb(color_scheme, completekey, stdin, stdout, context)