First page Back Continue Last page Overview Graphics

Examples

What happens if we leave the PATH entry blank in env from execvpe.py?

import os

env = {"XYZ":"BlaBla"}

args = ("test","abc")

os.execvpe("test.sh", args, env)

test.sh can't be found because bin2 isn't in $PATH:

$ ./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