I want to replace the current process with a new one using os.execv, this works fine unless you don’t have any arguments.
How can I call this even if I don’t have an arguments to pass to the process I want to launch ?
# Works fine, unless the arguments tuple wouldn't exist or be empty
os.execv('process.exe', ('arg1', 'arg2'))
Okay, after asking on IRC they pointed out why it works this way.
The first argument (arg0) is normally the filename of what you’re executing (sys.argv[0] for example), so the first argument should always be the filename.
This explains why the arguments aren’t optional, on IRC they said that arg0 is what the app will think its name is.