I have a python script that looks something like this:
for item in collection: print "what up" #do complicated stuff that takes a long time.
In bash, I run this script by doing the following:
$ python my.py | tee my_file.txt
However, all I see in bash is a blank line until the program finishes. Then, all of the print statements come all at one.
Is this the expected operation of tee? Can I use tee to see the output in real-time?