I'm using distutils to compile C code via a python script. If things go wrong, I want to be able to catch the error output. To this end, I've redirected stdout and stderr into temporary files before running the setup() command (you need to use os.dup2 for this).
On linux, it works fine. On windows + mingw I get some really weird behaviour:
- Without trying to capture, stdout and stderr are both written to the command prompt.
- When I try to capture, stdout works fine but the output to stderr disappears.
Does anybody understand what's going on here?