From 4a11636c60bbaf7d407bc961ca8b344e68307360 Mon Sep 17 00:00:00 2001 From: manuelgitgomes Date: Fri, 3 May 2024 15:15:46 +0100 Subject: [PATCH] #940 Hotfix to add stdout flush in order to guarantee real time output --- atom_core/src/atom_core/system.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atom_core/src/atom_core/system.py b/atom_core/src/atom_core/system.py index 0b59b7ff..b728be6e 100644 --- a/atom_core/src/atom_core/system.py +++ b/atom_core/src/atom_core/system.py @@ -4,6 +4,7 @@ import pty import re import subprocess +import sys from colorama import Fore, Style, Back from pytictoc import TicToc @@ -46,7 +47,7 @@ def execute(cmd, blocking=True, verbose=True, save_path=None, save_filename_addi if output: if verbose: print(output, end='') - # sys.stdout.flush() + sys.stdout.flush() stdout_data += output # Write the stdout data to the file if stdout_file is provided