use unbuffered streams (python -u)