Synchronously execute command `command` with params `params` in the
		remote chrome instance, returning the response from the chrome instance.
198899
def synchronous_command(self, command, tab_key, **params):
		
		self.log.debug("Synchronous_command to tab %s (%s):", tab_key, self._get_cr_tab_meta_for_key(tab_key))
		self.log.debug("	command: '%s'", command)
		self.log.debug("	params:  '%s'", params)
		self.log.debug("	tab_key:  '%s'", tab_key)

		send_id = self.send(command=command, tab_key=tab_key, params=params)
		resp = self.recv(message_id=send_id, tab_key=tab_key)

		self.log.debug("	Response: '%s'", str(resp).encode("ascii", 'ignore').decode("ascii"))

		# self.log.debug("	resolved tab idx %s:", self.tab_id_map[tab_key])
		return resp
524900
def execute_command(cls, command):
        
        return Popen(
            command,
            stdout=PIPE,
            stderr=STDOUT,
            start_new_session=True
        )
1328281
def _cmd(self, command, data=None, params=None, api_version=1):
    
    return self._post("commands/" + command, ApiCommand,
        data=data, params=params, api_version=api_version)
114280
async def immediate_execute_command(self, *args, **options):
        
        command_name = args[0]
        conn = self.connection
        # if this is the first call, we need a connection
        if not conn:
            conn = self.connection_pool.get_connection()
            self.connection = conn
        try:
            await conn.send_command(*args)
            return await self.parse_response(conn, command_name, **options)
        except (ConnectionError, TimeoutError) as e:
            conn.disconnect()
            if not conn.retry_on_timeout and isinstance(e, TimeoutError):
                raise
            # if we're not already watching, we can safely retry the command
            try:
                if not self.watching:
                    await conn.send_command(*args)
                    return await self.parse_response(conn, command_name, **options)
            except ConnectionError:
                # the retry failed so cleanup.
                conn.disconnect()
                await self.reset()
                raise
1228251
def execute_command(self, *args, **options):
        ""
        pool = self.connection_pool
        command_name = args[0]
        connection = pool.get_connection(command_name, **options)
        try:
            connection.send_command(*args)
            return self.parse_response(connection, command_name, **options)
        except (ConnectionError, TimeoutError) as e:
            connection.disconnect()
            if not (connection.retry_on_timeout and
                    isinstance(e, TimeoutError)):
                raise
            connection.send_command(*args)
            return self.parse_response(connection, command_name, **options)
        finally:
            pool.release(connection)
915270
def command(execute=None):  # noqa: E501
    
    if connexion.request.is_json:
        execute = Execute.from_dict(connexion.request.get_json())  # noqa: E501
    return 'do some magic!'
934413
public function execute($command, $params = null)
    {
        $url = $command;

        if (substr($url, -1) !== '/') {
            $url .= '/';
        }

        if ($params) {
            $parameters = array();
            foreach ($params as $k => $v) {
                if (strlen($v)) {
                    $parameters[] = urlencode($k) . '=' . urlencode($v);
                } else {
                    $parameters[] = urlencode($k);
                }
            }
            $url .= '?' . implode('&', $parameters);
        }

        try {
            $response = $this->client->get($url);
        } catch (\Exception $e) {
            return null;
        }
        $this->checkError($response, $url);

        return $response->getBody();
    }
592755
def command(execute=None):  # noqa: E501
    
    if connexion.request.is_json:
        execute = Execute.from_dict(connexion.request.get_json())  # noqa: E501

    if(not hasAccess()):
        return redirectUnauthorized()

    try:
        connector = None

        parameters = {}

        if (execute.command.parameters):
            parameters = execute.command.parameters

        credentials = Credentials()
        options = Options(debug=execute.command.options['debug'], sensitive=execute.command.options['sensitive'])

        if (execute.auth):
            credentials = mapUserAuthToCredentials(execute.auth, credentials)

        if (not execute.auth.api_token):
            options.sensitive = True

        connector = Connector(options=options, credentials=credentials, command=execute.command.command,
                              parameters=parameters)

        commandHandler = connector.execute()

        response = Response(status=commandHandler.getRequest().getResponseStatusCode(),
                            body=json.loads(commandHandler.getRequest().getResponseBody()))

        if (execute.command.options['debug']):
            response.log = connector.logBuffer

        return response
    except:
        State.log.error(traceback.format_exc())
        if ('debug' in execute.command.options and execute.command.options['debug']):
            return ErrorResponse(status=500,
                                 message="Uncaught exception occured during processing. To get a larger stack trace, visit the logs.",
                                 state=traceback.format_exc(3))
        else:
            return ErrorResponse(status=500, message="")
701356
def send_command_return(self, command, *arguments):
        
        return self.api.send_command_return(self, command, *arguments)
796423
def call(self, command, *args):
        
        command = self._normalize_command_name(command)
        args = self._normalize_command_args(command, *args)

        redis_function = getattr(self, command)
        value = redis_function(*args)
        return self._normalize_command_response(command, value)
3091
def execute_command(self, *args, **options):
        """"""
        pool = self.connection_pool
        command_name = args[0]
        for i in _xrange(self.execution_attempts):
            connection = pool.get_connection(command_name, **options)
            try:
                connection.send_command(*args)
                res = self.parse_response(connection, command_name, **options)
                pool.release(connection)
                return res
            except ConnectionError:
                pool.purge(connection)
                if i >= self.execution_attempts - 1:
                    raise
1085153
function execute(req, res) {
  var proxy = req.exec ? req.exec.proxy : this.proxy;
  res.send(null, proxy(req, res));
}
580876
def execute_command(self, cmd, timeout, wait_for_string, password):
        """"""
        try:
            self.last_command_result = None
            self.ctrl.send_command(cmd, password=password)
            if wait_for_string is None:
                wait_for_string = self.prompt_re

            # hide cmd in case it's password for further error messages or exceptions.
            if password:
                cmd = "*** Password ***"

            if not self.driver.wait_for_string(wait_for_string, timeout):
                self.chain.connection.log("Unexpected session disconnect during '{}' command execution".format(cmd))
                raise ConnectionError("Unexpected session disconnect", host=self.hostname)

            if self.last_command_result:
                output = self.last_command_result.replace('\r', '')
            else:
                output = self.ctrl.before.replace('\r', '')

            # not needed. Fixes the issue #11
            # second_line_index = output.find('\n') + 1
            # output = output[second_line_index:]
            return output

        except CommandSyntaxError as e:  # pylint: disable=invalid-name
            self.chain.connection.log("{}: '{}'".format(e.message, cmd))
            e.command = cmd
            # TODO: Verify why lint raises an issue
            raise e  # pylint: disable=raising-bad-type

        except (CommandTimeoutError, pexpect.TIMEOUT):
            self.chain.connection.log("Command timeout: '{}'".format(cmd))
            raise CommandTimeoutError(message="Command timeout", host=self.hostname, command=cmd)

        except ConnectionError as e:  # pylint: disable=invalid-name
            self.chain.connection.log("{}: '{}'".format(e.message, cmd))
            raise

        except pexpect.EOF:
            self.chain.connection.log("Unexpected session disconnect")
            raise ConnectionError("Unexpected session disconnect", host=self.hostname)

        except Exception as e:  # pylint: disable=invalid-name
            self.chain.connection.log("Exception {}".format(e))
            raise ConnectionError(message="Unexpected error", host=self.hostname)
976605
def _exec_request(self, service, method=None, path_args=None, data=None,
                      params=None):
        """"""
        if path_args is None:
            path_args = []

        req = {
            'method': method or 'get',
            'url': '/'.join(str(a).strip('/') for a in [
                cfg.CONF.tvdb.service_url, service] + path_args),
            'data': json.dumps(data) if data else None,
            'headers': self.headers,
            'params': params,
            'verify': cfg.CONF.tvdb.verify_ssl_certs,
        }

        LOG.debug('executing request (%s %s)', req['method'], req['url'])
        resp = self.session.request(**req)

        resp.raise_for_status()
        return resp.json() if resp.text else resp.text
408579
def execute_command(self, command):
        

        self.info_log("executing command: %s" % command)

        try:
            ssh = paramiko.SSHClient()
            ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

            k = paramiko.RSAKey.from_private_key_file(
                self.browser_config.get('ssh_key_path')
            )
            ssh.connect(
                self.private_ip,
                username=self.browser_config.get('username'),
                pkey=k
            )

            sleep_time = 0.1
            stdout = []
            stderr = []

            ssh_transport = ssh.get_transport()
            channel = ssh_transport.open_session()
            channel.setblocking(0)
            channel.exec_command(command)

            while True:

                while channel.recv_ready():
                    stdout.append(channel.recv(1000))

                while channel.recv_stderr_ready():
                    stderr.append(channel.recv_stderr(1000))

                if channel.exit_status_ready():
                    break

                sleep(sleep_time)

            # ret = channel.recv_exit_status()
            ssh_transport.close()

            ssh.close()

            return b''.join(stdout), b''.join(stderr)

        except Exception as e:
            msg = "Execute_command exception: %s" % str(e)
            self.error_log(msg)
            raise Exception(msg)
803278
function execute(req, res) {
  if(req.info.command.sub) {
    this.delegate(req, res);
  // no subcommand return command list
  }else{
    var list = getList.call(this);
    return res.send(null, list);
  }
}
981193
def do(self, command, files=None, use_long_polling=False, request_timeout=None, **query):
        
        url, params = self._prepare_request(command, query)
        return {
            "url": url, "params": params, "files": files, "stream": use_long_polling,
            "verify": True,  # No self signed certificates. Telegram should be trustworthy anyway...
            "timeout": request_timeout
        }