From 58d1455bdf2064448cd96f6d071715480918391c Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Fri, 18 Jun 2021 10:36:40 +0200 Subject: [PATCH] changed restart function --- source/restart.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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