BIG PYTHON REFACTOR

Python scripts moved out of python/ folder to root to be unified with plugins

+ frontend extension around api calls
This commit is contained in:
frdel 2026-03-05 17:28:11 +01:00
parent f94b7d742c
commit d02dda3667
326 changed files with 1096 additions and 862 deletions

View file

@ -1,36 +0,0 @@
import os
import sys
from python.helpers import runtime
from python.helpers.print_style import PrintStyle
_server = None
def set_server(server):
global _server
_server = server
def get_server(server):
global _server
return _server
def stop_server():
global _server
if _server:
_server.shutdown()
_server = None
def reload():
stop_server()
if runtime.is_dockerized():
exit_process()
else:
restart_process()
def restart_process():
PrintStyle.standard("Restarting process...")
python = sys.executable
os.execv(python, [python] + sys.argv)
def exit_process():
PrintStyle.standard("Exiting process...")
sys.exit(0)