How do I force Python\'s print function to output to the screen?
This is not a duplicate of Disable output buffering - the linked question is attempting unbuffe
Why not try using an unbuffered file?
f = open('xyz.log', 'a', 0)
OR
sys.stdout = open('out.log', 'a', 0)