restart python-script from within 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()