This commit is contained in:
2025-03-18 10:55:58 +08:00
parent cf51f3b7c4
commit 904aa4f1aa
17 changed files with 238 additions and 1 deletions
+28
View File
@@ -0,0 +1,28 @@
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字段')