Fixed Restart Command

This commit is contained in:
Alex Orid 2020-12-08 07:02:10 -05:00
parent dfbeb63aef
commit f7e3365116

View File

@ -2,6 +2,7 @@ import os
import sys
import psutil
import subprocess
import platform
clearScreen = lambda: os.system('cls' if os.name == 'nt' else 'clear')
@ -20,8 +21,13 @@ def restart_self():
#os.startfile("python C:/praxis/main.py")
#subprocess.run("python C:/praxis/main.py")
#subprocess.call("python main.py", shell=True)
os.system('start cmd /k python main.py')
hard_shutdown()
if platform.system() == 'Windows':
os.system('start cmd /k python main.py')
hard_shutdown()
if platform.system() == 'Linux':
os.system('python main.py')
hard_shutdown()
#os.system('python twitch_script.py')
#os.system('python discord_script.py')