From ffeae5e59b05fdf300888fb5e1c823d6866a5ae1 Mon Sep 17 00:00:00 2001 From: Liang Jiaqing Date: Mon, 11 May 2026 09:39:32 +0800 Subject: [PATCH] fix: hide code runner console window --- ga.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ga.py b/ga.py index 49acf8e5..39fddb22 100644 --- a/ga.py +++ b/ga.py @@ -51,7 +51,8 @@ def code_run(code, code_type="python", timeout=60, cwd=None, code_cwd=None, stop try: process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - bufsize=0, cwd=cwd, startupinfo=startupinfo + bufsize=0, cwd=cwd, startupinfo=startupinfo, + creationflags=0x08000000 if os.name == 'nt' else 0 ) start_t = time.time() t = threading.Thread(target=stream_reader, args=(process, full_stdout), daemon=True)