Was passiert, wenn wir in env von execvpe.py den PATH-Eintrag weglassen?
import os
env = {"XYZ":"BlaBla"}
args = ("test","abc")
os.execvpe("test.sh", args, env)
test.sh kann nicht gefunden werden, da bin2 nicht in $PATH ist:
$ ./execvpe.py
Traceback (most recent call last):
File "./execvpe.py", line 7, in <module>
os.execvpe("test.sh", args, env)
File "/usr/lib/python2.6/os.py", line 353, in execvpe
_execvpe(file, args, env)
File "/usr/lib/python2.6/os.py", line 380, in _execvpe
func(fullname, *argrest)
OSError: [Errno 2] No such file or directory