I have a python program that calls a subprocess using Popen(). This python program is called from a C program, using the Python/C API. Everything works fine except for the fact that the subprocess doesn't redirect the output to a file. If I use just the Python program, it works as it's supposed to do. If I call the same program from C, it doesn't.
Any clue?
fout = open('fout.txt','w+')
self.process = Popen(starting_cmd,stdout=fout)