Restarting a self-updating python script
In Linux, or any other form of unix, os.execl and friends are a good choice for this — you just need to re-exec sys.executable with the same parameters it was executed with last time (sys.argv, more or less) or any variant thereof if you need to inform your next incarnation that it’s actually a restart. … Read more