diff --git a/epanet/epanet.py b/epanet/epanet.py index fe2d077..acf42cd 100644 --- a/epanet/epanet.py +++ b/epanet/epanet.py @@ -309,8 +309,8 @@ def run_project(name: str, readable_output: bool = False) -> str: # 启动子进程 with subprocess.Popen( command, - stdout=subprocess.STDOUT, - stderr=subprocess.STDOUT, # 合并错误输出和标准输出 + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, # 合并错误输出和标准输出 text=True, # 文本模式(Python 3.7+) bufsize=1, # 行缓冲 encoding='utf-8', # 编码设置