diff --git a/source/restart.py b/source/restart.py index f23f641..d280d4e 100644 --- a/source/restart.py +++ b/source/restart.py @@ -1,7 +1,10 @@ +import subprocess import sys import os +from .definition import * + def restart(self): - os.execl(sys.executable, f'"{sys.executable}"', *sys.argv) + subprocess.Popen([sys.executable] + sys.argv, creationflags=CREATE_NO_WINDOW, cwd=os.getcwd()) sys.exit() \ No newline at end of file