Created
August 13, 2018 06:37
-
-
Save bashkirtsevich/3c2d5c2a4152b322d527ff8a7ba8948d to your computer and use it in GitHub Desktop.
Asyncio exec cmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| async def exec_shell_cmd(commands): | |
| for command in commands: | |
| process = await asyncio.create_subprocess_shell(command) | |
| await process.wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment