2

once i run a python script under bash by

python a.py >> output.txt

it is found that the screen output is not written to output.txt instantly. is there any way to ensure that output.txt could always up-to-date as we see it on the screen without redirection? some reference: this has helped python write to file instantly. i am wondering if we can do the same thing for screen output as well.

Chenming Zhang
  • 2,446
  • 2
  • 26
  • 34

0 Answers0