Run in unbuffered mode (printing is printed immediately rather than when the buffer reaches a certain size).

$ python -U