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

Method exec_python

python/openshell/sandbox.py:194–214  ·  view source on GitHub ↗
(
        self,
        function: Callable[..., object],
        *,
        args: Sequence[object] = (),
        kwargs: Mapping[str, object] | None = None,
        stream_output: bool = False,
        workdir: str | None = None,
        env: Mapping[str, str] | None = None,
        timeout_seconds: int | None = None,
    )

Source from the content-addressed store, hash-verified

192 )
193
194 def exec_python(
195 self,
196 function: Callable[..., object],
197 *,
198 args: Sequence[object] = (),
199 kwargs: Mapping[str, object] | None = None,
200 stream_output: bool = False,
201 workdir: str | None = None,
202 env: Mapping[str, str] | None = None,
203 timeout_seconds: int | None = None,
204 ) -> ExecResult:
205 return self._client.exec_python(
206 self.sandbox.id,
207 function,
208 args=args,
209 kwargs=kwargs,
210 stream_output=stream_output,
211 workdir=workdir,
212 env=env,
213 timeout_seconds=timeout_seconds,
214 )
215
216 def delete(self) -> bool:
217 return self._client.delete(self.sandbox.name)

Callers

nothing calls this directly

Calls 1

exec_pythonMethod · 0.45

Tested by

no test coverage detected