!759 sS python = [[ #!/usr/bin/python from subprocess import Popen, PIPE, STDOUT import pty import os import sys cmd = 'pocketsphinx_continuous -inmic yes -keyphrase "computer" -kws_threshold 1e-50' master, slave = pty.openpty() p = Popen(cmd, shell=True, stdin=PIPE, stdout=slave, stderr=slave, close_fds=True) stdout = os.fdopen(master) while True: sys.stdout.write(stdout.readline()) ]]; p { File fPython = getProgramFile("pocketsphinx.py"); makeExecutable(saveTextFile(fPython, python)); backtickToConsole_lineBuf(f2s(fPython), voidfunc(S line) { print("Line read: " + quote(line)); }); }