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
import io | |
import selectors | |
import subprocess | |
import sys | |
def capture_subprocess_output(subprocess_args): | |
# Start subprocess | |
# bufsize = 1 means output is line buffered | |
# universal_newlines = True is required for line buffering | |
process = subprocess.Popen(subprocess_args, |