Files
Person-Blur/main.py
T
2025-03-18 10:55:58 +08:00

28 lines
585 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import conf
import subprocess
scheme = conf.scheme
def run_script(script_name):
try:
subprocess.run(['python', script_name], check=True)
print(f"{script_name} success")
except subprocess.CalledProcessError as e:
print(f'Run {script_name} error: {e}')
except FileNotFoundError:
print(f'Can not found: {script_name}')
if __name__ == '__main__':
if scheme == 'A':
run_script("schemeA.py")
elif scheme == 'B':
run_script("schemeB.py")
else:
print('请检查配置文件conf.py中的scheme字段')