I'm trying to capture blender's console output to a file (as a result of a great suggestions from @Rich Sedman in another post) with something like
$ blender > /tmp/output.txt
The problem is that I need output.txt have always the content of the console but blender is buffering this output and not always I can access the text. I tried all kinds of flushing (line sys.stdout.flush(), or sys.stdout = fopen(sys.stdout.fileno(), 'w', 0), etc) and nothing seems to force an unbuffered output.
Is there a way to really force blender to use an unbuffered console?
Thanks!