os.execv without args argument
These three variants can resolve the problem:
cmd = '/usr/bin/vi'
os.execv(cmd, (' ',))
os.execv(cmd, [' '])
os.execl(cmd, '')
Usually, the first parameter of an argument list (sys.argv) is the command which had been used to invoke the application. So it is better to use one of those:
cmd = '/usr/bin/vi'
os.execv(cmd, (cmd,))
os.execv(cmd, [cmd])
os.execl(cmd, cmd)
os.exec* documentation on python.org
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.