获取最近一次 shell 命令输出 / Get the latest shell command output Returns: str: shell 命令输出 / shell command output Raises: RuntimeError: 如果获取失败
(self)
| 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: |
nothing calls this directly
no test coverage detected