code: def command_str(self):
          
          if isinstance(self.command, six.string_types):
              return self.command
          return ' '.join(map(six.moves.shlex_quote, self.command))
docs: get command to execute as string properly escaped
  
          :return: string