code: def _execute_handler(self, p_command, p_todo_id=None, p_output=None):
          
          p_output = p_output or self._output
          self._console_visible = False
  
          self._last_cmd = (p_command, p_output == self._output)
  
          try:
              p_command = shlex.split(p_command)
          except ValueError as verr:
              self._print_to_console('Error: ' + str(verr))
              return
  
          try:
              subcommand, args = get_subcommand(p_command)
          except ConfigError as cerr:
              self._print_to_console(
                  'Error: {}. Check your aliases configuration.'.format(cerr))
              return
  
          if subcommand is None:
              self._print_to_console(GENERIC_HELP)
              return
  
          env_args = (self.todolist, p_output, self._output, self._input)
          ids = None
  
          if '{}' in args:
              if self._has_marked_todos():
                  ids = self.marked_todos
              else:
                  ids = {p_todo_id} if p_todo_id else set()
  
              invalid_ids = self._check_id_validity(ids)
  
              if invalid_ids:
                  self._print_to_console('Error: ' + invalid_ids)
                  return
  
          transaction = Transaction(subcommand, env_args, ids)
          transaction.prepare(args)
          label = transaction.label
          self._backup(subcommand, p_label=label)
  
          try:
              if transaction.execute():
                  post_archive_action = transaction.execute_post_archive_actions
                  self._post_archive_action = post_archive_action
                  self._post_execute()
              else:
                  self._rollback()
          except TypeError:
              # TODO: show error message
              pass
docs: Executes a command, given as a string.