[Buildbot-devel] Where did my stdout go?

Sergey A. Lipnevich sergey at optimaltec.com
Mon Nov 5 01:41:47 UTC 2007


Greg Ward wrote:
(skipped)
> This has been replaced by:
>   factory.addStep(ShellCommand(command=["build-all-apps.py"]))
> 
> where build-all-apps.py boils down to
>   for app in ["app1", "app2", "app3"]:
>     subprocess.call(["build", app])
(skipped)

Can you explicitly make the child inherit parent's streams?

from sys import stdout, stderr
from subprocess import Popen
Popen(['ls'], shell=True, stdout=stdout, stderr=stderr)

As a workaround, you can also do stdout=PIPE and stderr=PIPE and then
print out the contents of Popen's stdout and stderr stream properties.
HTH,

Sergey.





More information about the devel mailing list