A simple example to run commands in a subprocess using asyncio.create_subprocess_exec and get the output using process.communicate:
.. literalinclude:: examples/subprocess_command.py
A simple example to communicate with an echo subprocess using process.stdin and process.stdout:
.. literalinclude:: examples/subprocess_echo.py
For more information, see the asyncio subprocess documentation.