code: def runcmd(self, cmd, args):
          '''Run a single command from pre-parsed arguments.
  
          This is intended to be run from :meth:`main` or somewhere else
          "at the top level" of the program.  It may raise
          :exc:`exceptions.SystemExit` if an argument such as ``--help``
          that normally causes execution to stop is encountered.
  
          '''
          dof = getattr(self, 'do_' + cmd, None)
          if dof is None:
              return self.default(' '.join([cmd] + args))
          argf = getattr(self, 'args_' + cmd, None)
          if argf is not None:
              parser = argparse.ArgumentParser(
                  prog=cmd,
                  description=getattr(dof, '__doc__', None))
              argf(parser)
              argl = parser.parse_args(args)
          else:
              argl = ' '.join(args)
          return dof(arglf runcmd(self, cmd, args):
          '''Run a single command from pre-parsed arguments.
  
          This is intended to be run from :meth:`main` or somewhere else
          "at the top level" of the program.  It may raise
          :exc:`exceptions.SystemExit` if an argument such as ``--help``
          that normally causes execution to stop is encountered.
  
          '''
          dof = getattr(self, 'do_' + cmd, None)
          if dof is None:
              return self.default(' '.join([cmd] + args))
          argf = getattr(self, 'args_' + cmd, None)
          if argf is not None:
              parser = argparse.ArgumentParser(
                  prog=cmd,
                  description=getattr(dof, '__doc__', None))
              argf(parser)
              argl = parser.parse_args(args)
          else:
              argl = ' '.join(args)
          return dof(argl)
docs: Run a single command from pre-parsed arguments.
  
          This is intended to be run from :meth:`main` or somewhere else
          "at the top level" of the program.  It may raise
          :exc:`exceptions.SystemExit` if an argument such as ``--help``
          that normally causes execution to stop is encountered.