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: Parse the line into a command name and a string containing
  the arguments.  Returns a tuple containing (command, args, line).
  'command' and 'args' may be None if the line couldn't be parsed.
docstr_tok: ["Parse","the","line","into","a","command","name","and","a","string","containing","the","arguments",".","Returns","a","tuple","containing","(","command",",","args",",","line",")",".","'command","'","and","'args","'","may","be","None","if","the","line","could","n't","be","parsed","."]
code: def parseline(self, line):
      """Parse the line into a command name and a string containing
      the arguments.  Returns a tuple containing (command, args, line).
      'command' and 'args' may be None if the line couldn't be parsed.
      """
      line = line.strip()
      if not line:
          return None, None, line
      elif line[0] == "?":
          line = "help " + line[1:]
      elif line[0] == "!":
          if hasattr(self, "do_shell"):
              line = "shell " + line[1:]
          else:
              return None, None, line
      i, n = 0, len(line)
      while i < n and line[i] in self.identchars:
          i = i + 1
      cmd, arg = line[:i], line[i:].strip()
      return cmd, arg, line
  
file_path: cpython/Lib/cmd.py
imports: import inspect, string, sys
label_desc: Use image node_id 7 for calling the Cmd obj's underlying member method code with example usage: obj.parseline(line) and returns: cmd,  arg,  line, None,  None,  line, None,  None,  line