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

Method process_output

bmtools/tools/shell/api.py:93–97  ·  view source on GitHub ↗
(self, output: str, command: str)

Source from the content-addressed store, hash-verified

91 return output
92
93 def process_output(self, output: str, command: str) -> str:
94 # Remove the command from the output using a regular expression
95 pattern = re.escape(command) + r"\s*\n"
96 output = re.sub(pattern, "", output, count=1)
97 return output.strip()
98
99 def _run_persistent(self, command: str) -> str:
100 """Run commands and return final output."""

Callers 1

_run_persistentMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected