On 2016-06-26 17:38, p.infante...@gmail.com wrote:
Hello, I'm currently running another Python program (prog2.py) in my program
via subprocess.
input_args = ['python', '/path/to/prog2.py'] + self.chosen_args
file = open("logfile.txt",'w')
self.process = Popen((input_args), stdout=file)
However, the logs that prog2.py contains still show at the terminal since logs
are not covered in the stdout module and printed in the terminal, also, the
logfile.txt is empty. Is there a way I can access those logs while in prog1.py?
I can't modify prog2.py since it is not mine. I'm stuck here for days now, any
tips or help will do.
The output you're seeing might be going to stderr, not stdout.
--
https://mail.python.org/mailman/listinfo/python-list