Re: Launching a process with stdout in the terminal and captured

2016-06-19 Thread Lawrence D’Oliveiro
On Sunday, June 19, 2016 at 8:29:50 PM UTC+12, Olive wrote: > > That's not what I am looking for. I want to let the end user intercat with the > process, not my script. What I want is the content (after the process has > exited) of all what it has written on standard output. Use the logging featur

Re: Launching a process with stdout in the terminal and captured

2016-06-19 Thread Olive
eryk sun wrote: > On Sat, Jun 18, 2016 at 7:09 AM, Olive > wrote: > > I am here on Linux. > > ... > > Note that if it is possible I would prefer that the launched command see > > its standard > > output connected to a terminal > > Try pexpect. > > https://pypi.python.org/pypi/pexpect That'

Re: Launching a process with stdout in the terminal and captured

2016-06-18 Thread eryk sun
On Sat, Jun 18, 2016 at 7:09 AM, Olive wrote: > I am here on Linux. > ... > Note that if it is possible I would prefer that the launched command see its > standard > output connected to a terminal Try pexpect. https://pypi.python.org/pypi/pexpect -- https://mail.python.org/mailman/listinfo/pyt

Launching a process with stdout in the terminal and captured

2016-06-18 Thread Olive
I am here on Linux. I want to launch a process just like os.system, (output to a terminal in an unbuffered way so as to support interaction) and at the same time capturing the output of the process (analogous to the Unix tee command). I have found some tricks on the web, but is it a standard way