def restart_program(self):
print("restart")
python = sys.executable #获取当前执行python
os.execl(python, python, *sys.argv) #执行命令
通过产生子进程取代原进程
def restart_program(self):
print("restart")
python = sys.executable #获取当前执行python
os.execl(python, python, *sys.argv) #执行命令
通过产生子进程取代原进程