Skip to content

Instantly share code, notes, and snippets.

@bashkirtsevich
Created August 13, 2018 06:37
Show Gist options
  • Select an option

  • Save bashkirtsevich/3c2d5c2a4152b322d527ff8a7ba8948d to your computer and use it in GitHub Desktop.

Select an option

Save bashkirtsevich/3c2d5c2a4152b322d527ff8a7ba8948d to your computer and use it in GitHub Desktop.
Asyncio exec cmd
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