MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / run

Method run

bmtools/tools/shell/api.py:60–72  ·  view source on GitHub ↗

Run commands and return final output.

(self, commands: Union[str, List[str]])

Source from the content-addressed store, hash-verified

58 return process
59
60 def run(self, commands: Union[str, List[str]]) -> str:
61 """Run commands and return final output."""
62 print("entering run")
63 if isinstance(commands, str):
64 commands = [commands]
65 commands = ";".join(commands)
66 print(commands)
67 if self.process is not None:
68 return self._run_persistent(
69 commands,
70 )
71 else:
72 return self._run(commands)
73
74 def _run(self, command: str) -> str:
75 """Run commands and return final output."""

Callers 2

_runMethod · 0.45
shell_runFunction · 0.45

Calls 2

_run_persistentMethod · 0.95
_runMethod · 0.95

Tested by

no test coverage detected