Redirect subprocess stderr to stdout

Viewed 58154

I want to redirect the stderr output of a subprocess to stdout. The constant STDOUT should do that, shouldn't it?

However,

$ python >/dev/null -c 'import subprocess;\
                        subprocess.call(["ls", "/404"],stderr=subprocess.STDOUT)'

does output something. Why is that the case, and how do I get the error message on stdout?

2 Answers
Related