How to restart the file using code in python code example
Example: how to reboot a python script
import os
while 1:
os.system("python main.py")
print "Restarting..."
exit()
import os
while 1:
os.system("python main.py")
print "Restarting..."
exit()