Just found out that python3 print accepts flush=True and file=sys.stderr