:meth:`.WCommandProto.exec` implementation
341248
def exec(self, *command_tokens, **command_env):
		
		mutated_command_tokens = self.mutate_command_tokens(*command_tokens)
		if mutated_command_tokens is not None:
			command = self.selector().select(*mutated_command_tokens, **command_env)
			if command is not None:
				return command.exec(*mutated_command_tokens, **command_env)

		raise RuntimeError('Command mismatch: %s' % self.join_tokens(*command_tokens))
141084
def execute(self):
        '''  '''

        # Create a temporary directory
        self.temp_dir = tempfile.mkdtemp()
        os.chdir(self.temp_dir)

        # Spin up the directory watcher
        DirWatcher(self.temp_dir, self.file_created)

        # Spin up tcpdump
        self.subprocess_manager(self.tcpdump_cmd)
262075
def execute(self, cmd, cwd):
        
        self.output = ""
        env = os.environ.copy()
        env.update(self.env)
        if six.PY2:  # nocv
            # Ugly hack because python 2.7.
            if self._stdout == self.DEVNULL:
                self._stdout = open(os.devnull, 'w+b')
            if self._stderr == self.DEVNULL:
                self._stderr = open(os.devnull, 'w+b')
        proc = subprocess.Popen(
            cmd, stdout=self._stdout, stderr=self._stderr,
            bufsize=0, universal_newlines=True,
            cwd=cwd, env=env,
            close_fds=ON_POSIX
        )
        for line in self._unbuffered(proc):
            self.line_handler(line)
        return_code = proc.poll()
        if return_code:
            logger.error(self.output)
            raise subprocess.CalledProcessError(
                return_code, cmd, output=str(self.output)
            )
        return self.output
1053950
def exec_cmd(self, cmdstr):
        
        parts = cmdstr.split()
        if len(parts):
            cmd, args = parts[0], parts[1:]
            self._dispatch(cmd, args)
        else:
            pass
155154
def _exec_command(self, command: str):
        
        stdin, stdout, stderr = self._ssh.exec_command(command)
        # Clearing the buffers
        stdout.read()
        stderr.read()
        stdin.close()
574557
def exec_for_code(command, options = {}, &block)
      options = (options || {}).merge(retrieve_exit_code: true, on_non_zero_exit_code: :ignore)
      exec command, options, &block
      last_exit_code
    end
739818
function exec(command, options) {
    var d = Promise.defer();

    var child = childProcess.exec(command, options, function(err, stdout, stderr) {
        if (!err) {
            return d.resolve();
        }

        err.message = stdout.toString('utf8') + stderr.toString('utf8');
        d.reject(err);
    });

    child.stdout.on('data', function (data) {
        d.notify(data);
    });

    child.stderr.on('data', function (data) {
        d.notify(data);
    });

    return d.promise;
}
1278164
def exec(self, args):
        

        logger.debug("update %s", args.update)
        self.update(args.update)
273497
function exec() {

  var actions = {
    commands: {
      'list-dependencies': { action: _listDependencies },
      'list-devdependencies': { action: _listDevDependencies },
      'list-peerdependencies': { action: _listPeerDependencies },
      'list-optdependencies': { action: _listOptDependencies },
      'list-alldependencies': { action: _listAllDependencies },
      'set-node-engine': { action: _setNodeEngine },
      'sort-dependencies': { action: _sortDependencies },
      'sort-devdependencies': { action: _sortDevDependencies },
      'sort-peerdependencies': { action: _sortPeerDependencies },
      'sort-optdependencies': { action: _sortOptDependencies },
      'sort-alldependencies': { action: _sortAllDependencies },
      'traverse-dependencies': { action: _traverseDependencies },
      'upgrade-version-patch': { action: _upgradeVersionPatch },
      'upgrade-version-minor': { action: _upgradeVersionMinor },
      'upgrade-version-major': { action: _upgradeVersionMajor },
      'upgrade-version': { action: _upgradeVersionPatch },
      'upgrade-dependencies': { action: _upgradeDependencies },
    }
  };

  cli.command(__dirname, actions);
}
964409
def fork_exec(args, stdin='', **kwargs):
    

    as_bytes = isinstance(stdin, bytes)
    source = stdin if as_bytes else stdin.encode(locale)
    p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, **kwargs)
    stdout, stderr = p.communicate(source)
    if as_bytes:
        return stdout, stderr
    return (stdout.decode(locale), stderr.decode(locale))
1152143
def exec(*commands)
      ret = ''
      commands.each { |cmd| ret += shell.exec(cmd) }
      ret + shell.exec('exec')
    end
805123
def _execCommand(Argv, collect_missing):
  
  """
  if not Argv:
    raise HandledException('Please specify a command!')

  RouteParts = Argv[0].split('/')
  Args, KwArgs = getDigestableArgs(Argv[1:])

  ResolvedMember = getDescendant(BaseGroup, RouteParts[:])

  if isinstance(ResolvedMember, Group):
    raise HandledException('Please specify a task.', Member=ResolvedMember)

  if not isinstance(ResolvedMember, Task):
    raise HandledException('No such task.', Member=BaseGroup)

  return ResolvedMember.__collect_n_call__(*Args, **KwArgs) if collect_missing else ResolvedMember(*Args, **KwArgs)
394115
def execute(self, command):
        

        logger.info("running command %s", command)
        cmd = ["podman", "exec", self.get_id()] + command
        output = run_cmd(cmd, return_output=True)

        return output
1195896
async def execute_process(*cmd, log=None, loop=None):
    '''
    

    '''
    p = await asyncio.create_subprocess_exec(
        *cmd,
        stdin=asyncio.subprocess.PIPE,
        stdout=asyncio.subprocess.PIPE,
        stderr=asyncio.subprocess.PIPE,
        loop=loop)
    stdout, stderr = await p.communicate()
    if log:
        log.debug("Exec %s -> %d", cmd, p.returncode)
        if stdout:
            log.debug(stdout.decode('utf-8'))
        if stderr:
            log.debug(stderr.decode('utf-8'))
    return p.returncode == 0
1110780
function exec (cmd, callback) {
  debug('executing cmd', cmd)
  child_process.exec(cmd, function (err, stdout, stderr) {
    debug('command completed')
    if (err) {
      if (callback) {
        callback(err)
      }
    } else {
      if (callback) {
        callback(null, stdout, stderr)
      }
    }
  })
}
1052856
def execute(cmd, verbosityThreshold = 1, **kwargs):
    ''''''
    global exectue_defaults
    opts = merge(exectue_defaults, kwargs)              # the options computed from the default options together with the passed in options.
    subopts = filterKWArgsForFunc(opts, subprocess.Popen)
    formattedCmd = cmd.format(**getFormatBindings(cmd,1))

    shouldPrint = opts['verbosity'] >= verbosityThreshold
    isDryrun = opts['dryrun']

    if shouldPrint:
        msg = "would execute:" if isDryrun else "executing:"
        pre = "("+subopts['cwd']+")" if (subopts['cwd'] != exectue_defaults['cwd']) else ""
        print "{pre}{msg} {formattedCmd}".format(pre=pre, formattedCmd=formattedCmd, msg=msg)
    if isDryrun:
        return (0, None, None)

    printStdOut = shouldPrint and opts['permitShowingStdOut']
    printStdErr = shouldPrint and opts['permitShowingStdErr']
    returnCode = 0
    if opts['captureStdOutStdErr']:
        (returnCode, stdOut, stdErr) = _AsynchronouslyGetProcessOutput(formattedCmd, printStdOut, printStdErr, **subopts)    
    else:
        subopts['stdout'] = None if printStdOut else subprocess.PIPE
        subopts['stderr'] = None if printStdErr else subprocess.PIPE
        process = subprocess.Popen(formattedCmd, **subopts)
        res = process.communicate()
        returnCode = process.returncode
        stdOut = res[0]
        stdErr = res[1]

    if returnCode and not opts['ignoreErrors']:
        print colored('Command {} failed with return code {}!'.format(cmd, returnCode),'red')
        sys.exit(returnCode)
    
    # always print any errors
    return (returnCode, stdOut, stdErr)
19095
def _execute(params, cwd):
    

    proc = subprocess.Popen(
        params,
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
        cwd=cwd
    )
    stdout, stderr = proc.communicate()
    code = proc.wait()
    if code != 0:
        e = OSError('subprocess exit code for %r was %d: %s' % (params, code, stderr))
        e.stdout = stdout
        e.stderr = stderr
        raise e
    return (stdout, stderr)