Do you want to know the details regarding “how to reboot a python script”. If yes, you’re in the correct post.
how to reboot a python script
sys.stdout.flush() os.execl(sys.executable, 'python', __file__, *sys.argv[1:])
import os while 1: os.system("python main.py") print "Restarting..." exit()
import os os.system("python main.py") exit()
I hope this tutorial helps you to know about “how to reboot a python script”. If you have any doubts regarding this article please let us know via the comment section. Share this article with your friends and family via social networks.