MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / exec

Method exec

python/openshell/sandbox.py:736–755  ·  view source on GitHub ↗
(
        self,
        command: Sequence[str],
        *,
        stream_output: bool = False,
        workdir: str | None = None,
        env: Mapping[str, str] | None = None,
        stdin: bytes | None = None,
        timeout_seconds: int | None = None,
    )

Source from the content-addressed store, hash-verified

734 self._client = None
735
736 def exec(
737 self,
738 command: Sequence[str],
739 *,
740 stream_output: bool = False,
741 workdir: str | None = None,
742 env: Mapping[str, str] | None = None,
743 stdin: bytes | None = None,
744 timeout_seconds: int | None = None,
745 ) -> ExecResult:
746 if self._session is None:
747 raise SandboxError("sandbox context has not been entered")
748 return self._session.exec(
749 command,
750 stream_output=stream_output,
751 workdir=workdir,
752 env=env,
753 stdin=stdin,
754 timeout_seconds=timeout_seconds,
755 )
756
757 def exec_python(
758 self,

Callers 2

execMethod · 0.45

Calls 1

SandboxErrorClass · 0.85

Tested by 1