2022-08-26 13:02:52 +03:00
|
|
|
import glob
|
2022-09-15 17:54:30 +03:00
|
|
|
import importlib
|
|
|
|
import os
|
2022-08-26 13:02:52 +03:00
|
|
|
import subprocess
|
|
|
|
import sys
|
|
|
|
|
2022-09-15 17:54:30 +03:00
|
|
|
RUNNER_FOLDER = 'runners'
|
|
|
|
|
|
|
|
scripts = glob.glob(f"./{RUNNER_FOLDER}/*.py")
|
2022-08-26 13:02:52 +03:00
|
|
|
scripts.sort()
|
2022-09-15 17:54:30 +03:00
|
|
|
modules = [os.path.basename(x)[:-3] for x in scripts]
|
|
|
|
|
2022-09-16 18:15:04 +03:00
|
|
|
file_data = []
|
|
|
|
|
2022-09-15 17:54:30 +03:00
|
|
|
for m in modules:
|
|
|
|
runner = importlib.import_module('.' + m, package=RUNNER_FOLDER)
|
2022-09-16 18:15:04 +03:00
|
|
|
file_data = runner.main(file_data)
|
2022-08-26 13:02:52 +03:00
|
|
|
|
2022-09-15 17:54:30 +03:00
|
|
|
'''
|
2022-08-26 13:02:52 +03:00
|
|
|
for script in scripts:
|
2022-09-15 17:54:30 +03:00
|
|
|
runner = importlib.import_module('.' + script[:3], package=__name__)
|
|
|
|
runner.main()
|
|
|
|
'''
|