1
0
mirror of https://github.com/MarkParker5/STARK.git synced 2024-11-24 08:12:13 +02:00
STARK/start.py
2022-04-26 02:47:55 +02:00

41 lines
875 B
Python

# !/usr/local/bin/python3.8
# entry point
import os, sys
import multiprocessing
import Features
import Controls
from Controls.API.main import app
def multiprocess():
controls = [
Controls.VoiceAssistant(),
Controls.TelegramBot(),
#RemoteControl(),
#Django(),
]
processes = []
for control in controls:
process = multiprocessing.Process(target = control.start)
process.start()
for process in processes:
process.join()
def multiterminal():
controls = {
'VoiceAssistant': Controls.VoiceAssistant,
'TelegramBot': Controls.TelegramBot
}
if len(sys.argv) > 1:
controls.get(sys.argv[1])().start()
else:
for key in controls.keys():
os.system(f'lxterminal --command="python start.py {key}"')
if __name__ == '__main__': pass#multiterminal()