From 006eef1d948adcb928b19ecd647cf3df34ae3157 Mon Sep 17 00:00:00 2001 From: dongchangxi <458593490@qq.com> Date: Sun, 12 Jan 2025 00:07:45 +0800 Subject: [PATCH] 1 --- yj_local_build/main_step1.py | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/yj_local_build/main_step1.py b/yj_local_build/main_step1.py index 926a036..90a8866 100644 --- a/yj_local_build/main_step1.py +++ b/yj_local_build/main_step1.py @@ -102,30 +102,7 @@ def detect_markers(psid, pid): -exportReconstructionRegion "{os.path.join(config["workdir"], pid, f"{pid}.rcbox")}" \ {textpicCmd} -save "{os.path.join(config["workdir"], pid, f"{pid}.rcproj")}" -quit' print(cmd) - cmd = shlex.split(cmd) - #res = subprocess.run(cmd) - - # ######################################## - process = subprocess.Popen(cmd, shell=True) - # 获取主进程的 PID - pidddd = process.pid - - while True: - print("process",process.wait()) - - # 在等待主进程的同时,检查子进程的状态 - while process.poll() is None: - print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 进程 {pidddd} 运行中...') - # 这里可以使用 os.wait() 等待子进程的退出 - time.sleep(2) - print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") - print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") - print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") - print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") - print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") - print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") - # ######################################## - + cmd = shlex.split(cmd) time.sleep(3) fix_region() print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 定位点检测完成, 共费时{diff_time(start_time)}')