- fazer todos os prints passarem o parâmetro flush=True
import functools print = functools.partial(print, flush=True)
- chamar o python e direcionar as saídas, tipo 1>/dev/null 2>/dev/null
- chamar o python com o parâmetro -u (não funcionou comigo)
Referência
https://stackoverflow.com/questions/230751/how-to-flush-output-of-print-function