diff options
Diffstat (limited to 'realtime/rt/util.py')
-rw-r--r-- | realtime/rt/util.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/realtime/rt/util.py b/realtime/rt/util.py index 7f877161..263e33fb 100644 --- a/realtime/rt/util.py +++ b/realtime/rt/util.py @@ -1,4 +1,5 @@ import subprocess +import sys import threading def popen_io(cmd): @@ -6,6 +7,11 @@ def popen_io(cmd): consume_stream(p.stderr) return p +def popen_io_v(cmd): + sys.stderr.write('{}\n'.format(' '.join(cmd))) + p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE) + return p + def consume_stream(stream): def consume(s): for _ in s: |