I'm running a command like this:
python mycode.py | tee foobar.log
This code does a lot of "print" to stdout, and without the pipe I can see some output immediately. With the pipe and tee, however, it takes long time until I see the first output, and then there is a lot of it. Looks like some buffer is waiting to be filled, and only when it is full, it dumps everything at once. I'm not sure whether it's tee, python or ubuntu problem. Same problems occurs with ipython for instance. What to do?
Thanks!