tee and python

Keywords: tee, python, problem, not working, Linux

I just notices, that python and tee are not playing along so well. If you pipe your python program to tee, it appears that nothing is written to that file or the standart output

More veteran Linux/python people will go like "ahh, yeah sure, that's the buffering" and they are totally right. To circumvent this issue, use unbuffered streams with python -u ... like in

This asks python to be totally unbuffered. From the man page:

Leave a Reply

Your email address will not be published.