subprocess 隐藏调用过程

This commit is contained in:
xaoyaoo 2024-03-15 15:10:19 +08:00
parent b6f7bee8ac
commit a40259b204

View File

@ -374,7 +374,8 @@ def merge_real_time_db(key, db_path: str, merge_path: str, CreateTime: int = 0,
# 调用cmd命令
cmd = f"{real_time_exe_path} \"{key}\" \"{db_path}\" \"{out_path}\" {CreateTime} {endCreateTime}"
# os.system(cmd)
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
creationflags=subprocess.CREATE_NO_WINDOW)
p.communicate()
if not os.path.exists(out_path):