This file contains 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
""" | |
Problem: provide two-way communication with a subprocess in Python. | |
See also: | |
- https://kevinmccarthy.org/2016/07/25/streaming-subprocess-stdin-and-stdout-with-asyncio-in-python/ | |
- http://eli.thegreenplace.net/2017/interacting-with-a-long-running-child-process-in-python/ | |
""" | |
import asyncio | |
import sys |