Moved main.py to serve.py, implemented modularization and added control module
This commit is contained in:
parent
ad6190b46a
commit
e185786959
6 changed files with 138 additions and 21 deletions
21
main.py
21
main.py
|
|
@ -1,21 +0,0 @@
|
|||
from importlib import import_module
|
||||
from threading import Thread
|
||||
from subprocess import run
|
||||
from pathlib import Path
|
||||
|
||||
import libminecraft
|
||||
import libsignal
|
||||
|
||||
|
||||
minecraftThread = Thread(target=libminecraft.main)
|
||||
signalThread = Thread(target=libsignal.main)
|
||||
|
||||
minecraftThread.start()
|
||||
signalThread.start()
|
||||
|
||||
for file in Path("modules").iterdir():
|
||||
if file.name.endswith(".py"):
|
||||
import_module("modules."+file.name[:-3])
|
||||
|
||||
minecraftThread.join()
|
||||
signalThread.join()
|
||||
Loading…
Add table
Add a link
Reference in a new issue