class_docstr: A simple framework for writing line-oriented command interpreters.
  
  These are often useful for test harnesses, administrative tools, and
  prototypes that will later be wrapped in a more sophisticated interface.
  
  A Cmd instance or subclass instance is a line-oriented interpreter
  framework.  There is no good reason to instantiate Cmd itself; rather,
  it's useful as a superclass of an interpreter class you define yourself
  in order to inherit Cmd's methods and encapsulate action methods.
class_docstr_tok: ["A","simple","framework","for","writing","line-oriented","command","interpreters",".","These","are","often","useful","for","test","harnesses",",","administrative","tools",",","and","prototypes","that","will","later","be","wrapped","in","a","more","sophisticated","interface",".","A","Cmd","instance","or","subclass","instance","is","a","line-oriented","interpreter","framework",".","There","is","no","good","reason","to","instantiate","Cmd","itself",";","rather",",","it","'s","useful","as","a","superclass","of","an","interpreter","class","you","define","yourself","in","order","to","inherit","Cmd","'s","methods","and","encapsulate","action","methods","."]
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.
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","."]
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.
  
      """
  
      self.preloop()
      if self.use_rawinput and self.completekey:
          try:
              import readline
  
              self.old_completer = readline.get_completer()
              readline.set_completer(self.complete)
              readline.parse_and_bind(self.completekey + ": complete")
          except ImportError:
              pass
      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:
                  if self.use_rawinput:
                      try:
                          line = input(self.prompt)
                      except EOFError:
                          line = "EOF"
                  else:
                      self.stdout.write(self.prompt)
                      self.stdout.flush()
                      line = self.stdin.readline()
                      if not len(line):
                          line = "EOF"
                      else:
                          line = line.rstrip("\r\n")
              line = self.precmd(line)
              stop = self.onecmd(line)
              stop = self.postcmd(stop, line)
          self.postloop()
      finally:
          if self.use_rawinput and self.completekey:
              try:
                  import readline
  
                  readline.set_completer(self.old_completer)
              except ImportError:
                  pass
  
file_path: catboost/contrib/tools/python3/src/Lib/cmd.py
imports: import string, sys
label_desc: Use image node_id 2 for calling the Cmd obj's underlying member method code with example usage: obj.cmdloop(intro) without return types