From e45942b1aa57a0459e3116142a47a3aca14d4fb1 Mon Sep 17 00:00:00 2001 From: Erik Peterson Date: Fri, 7 Jul 2023 14:55:51 -0700 Subject: [PATCH] Print out all of stdout on each process poll. --- agbenchmark/agent_interface.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/agbenchmark/agent_interface.py b/agbenchmark/agent_interface.py index 05540f6d372..77eb110bf3c 100644 --- a/agbenchmark/agent_interface.py +++ b/agbenchmark/agent_interface.py @@ -61,8 +61,9 @@ def run_agent( while True: if process.stdout is None: continue - output = process.stdout.readline() - print(output.strip()) + + while output := process.stdout.readline(): + print(output.strip()) # Check if process has ended if process.poll() is not None: