[EMAIL PROTECTED] wrote:
  Hello,

  I'm launching a script as follows:
<code>
p = subprocess.Popen(['./p.py', 'aa'])

p.wait()
</code>

  If p.py writes to sys.stdout, then it is shown on the console....
You seem to be missing the fact that ./py is run in a different process.
The "sys.stdout" that p.py uses is different from that in the program calling Popen. In fact, it could be using a different Python. The
situation is really similar to
    p = subprocess.Popen([<basic program>, 'aa'])
in that you have no way to "muck with the guts" of the subprocess, you
can only post-process its output.

--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to