This commit is contained in:
DingZQ
2025-06-02 18:54:55 +08:00
parent 1e006673e4
commit 320735bc85

View File

@@ -289,6 +289,7 @@ def run_project(name: str, readable_output: bool = False) -> str:
rpt = os.path.join(os.path.join(dir, 'temp'), input + '.rpt')
opt = os.path.join(os.path.join(dir, 'temp'), input + '.opt')
command = f'{exe} {inp} {rpt} {opt}'
print(command)
data = {}
@@ -308,7 +309,7 @@ def run_project(name: str, readable_output: bool = False) -> str:
# 启动子进程
with subprocess.Popen(
command,
stdout=subprocess.PIPE,
stdout=subprocess.STDOUT,
stderr=subprocess.STDOUT, # 合并错误输出和标准输出
text=True, # 文本模式Python 3.7+
bufsize=1, # 行缓冲