You’re looking for os.exec*() family of commands.
To restart your current program with exact the same command line arguments as it was originally run, you could use the following:
os.execv(sys.argv[0], sys.argv)
You’re looking for os.exec*() family of commands.
To restart your current program with exact the same command line arguments as it was originally run, you could use the following:
os.execv(sys.argv[0], sys.argv)