| 12 | |
| 13 | |
| 14 | class WindowsExecutor: |
| 15 | async def execute(self, cmd: str) -> Tuple[int, str, str]: |
| 16 | process = await asyncio.create_subprocess_shell( |
| 17 | cmd, |
| 18 | stdout=asyncio.subprocess.PIPE, |
| 19 | stderr=asyncio.subprocess.PIPE, |
| 20 | shell=True |
| 21 | ) |
| 22 | stdout, stderr = await process.communicate() |
| 23 | return process.returncode, stdout.decode(), stderr.decode() |
| 24 | |
| 25 | |
| 26 | class UnixExecutor: |