MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / shell_output

Method shell_output

source/binding/Python/maa/controller.py:380–392  ·  view source on GitHub ↗

获取最近一次 shell 命令输出 / Get the latest shell command output Returns: str: shell 命令输出 / shell command output Raises: RuntimeError: 如果获取失败

(self)

Source from the content-addressed store, hash-verified

378
379 @property
380 def shell_output(self) -> str:
381 """获取最近一次 shell 命令输出 / Get the latest shell command output
382
383 Returns:
384 str: shell 命令输出 / shell command output
385
386 Raises:
387 RuntimeError: 如果获取失败
388 """
389 string_buffer = StringBuffer()
390 if not Library.framework().MaaControllerGetShellOutput(self._handle, string_buffer._handle):
391 raise RuntimeError("Failed to get shell output.")
392 return string_buffer.get()
393
394 @property
395 def connected(self) -> bool:

Callers

nothing calls this directly

Calls 3

getMethod · 0.95
frameworkMethod · 0.80
StringBufferClass · 0.70

Tested by

no test coverage detected