docstr: Repeatedly issue a prompt, accept input, parse an initial prefix
  off the received input, and dispatch to action methods, passing them
  the remainder of the line as argument.
  
  override the same methods from cmd.Cmd to provide prompt toolkit replacement.
docstr_tok: ["Repeatedly","issue","a","prompt",",","accept","input",",","parse","an","initial","prefix","off","the","received","input",",","and","dispatch","to","action","methods",",","passing","them","the","remainder","of","the","line","as","argument",".","override","the","same","methods","from","cmd.Cmd","to","provide","prompt","toolkit","replacement","."]
code: def cmdloop(self, intro=None):
      """Repeatedly issue a prompt, accept input, parse an initial prefix
      off the received input, and dispatch to action methods, passing them
      the remainder of the line as argument.
  
      override the same methods from cmd.Cmd to provide prompt toolkit replacement.
      """
      if not self.use_rawinput:
          raise ValueError(
              "Sorry ipdb does not support use_rawinput=False"
          )
  
      self.preloop()
  
      try:
          if intro is not None:
              self.intro = intro
          if self.intro:
              self.stdout.write(str(self.intro) + "\n")
          stop = None
          while not stop:
              if self.cmdqueue:
                  line = self.cmdqueue.pop(0)
              else:
                  self._ptcomp.ipy_completer.namespace = (
                      self.curframe_locals
                  )
                  self._ptcomp.ipy_completer.global_namespace = (
                      self.curframe.f_globals
                  )
                  try:
                      line = self.pt_cli.run(
                          reset_current_buffer=True
                      ).text
                  except EOFError:
                      line = "EOF"
              line = self.precmd(line)
              stop = self.onecmd(line)
              stop = self.postcmd(stop, line)
          self.postloop()
      except Exception:
          raise
  
imports: import signal
  import sys
  from IPython.core.debugger import Pdb
  from IPython.core.completer import IPCompleter
  from .ptutils import IPythonPTCompleter
  from .shortcuts import suspend_to_bg, cursor_in_leading_ws
  from prompt_toolkit.enums import DEFAULT_BUFFER
  from prompt_toolkit.filters import Condition, HasFocus, HasSelection, ViInsertMode, EmacsInsertMode
  from prompt_toolkit.keys import Keys
  from prompt_toolkit.key_binding.manager import KeyBindingManager
  from prompt_toolkit.key_binding.bindings.completion import display_completions_like_readline
  from prompt_toolkit.token import Token
  from prompt_toolkit.shortcuts import create_prompt_application
  from prompt_toolkit.interface import CommandLineInterface
  from prompt_toolkit.enums import EditingMode
label_desc: Use image node_id 3 for calling the TerminalPdb obj's underlying member method code with example usage: obj.cmdloop(intro) without return types