With python -u script, you can make stdout unbuffered. Is there a way to do it in the script itself? I use just a script with a shebang (#!/usr/bin/env python) and then it is not possible to use -u.