Python - capturing stderr of subprocesses with their shell stdout alive?

Haven't tested this, but can you do import sys pp = subprocess. Popen(command, stderr = fpw, stdout = sys. Stdout).

Edit: didn't notice that the subprocesses are in different windows. Not sure why changing the stderr has any effect on what's being output to stdout. Are you sure that the reason the output's going away is that it's actually stderr?

– I82Much Mar 24 at 15:50.

I82Much, thank you for your answer and comment. Yes, your comment about stderr was absolutely right. I was developing in windows7.In linux (ubuntu10), the following simply worked out: cmd_line4sub = command + ' 2> ' + ftempname pp = subprocess.

Popen('/usr/bin/xterm','-e',cmd_line4sub,stderr = fpw) It opens new shells, printing subprocess stdout. The parent process captures subprocess stderr.It is my first goal. If I could ever figure out how to do in windows, I'll post my answer;) (I'm the same user as the questioner, but I cannot make them the same account...).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions