First page Back Continue Last page Overview Image

execlpe() anstatt execvpe()

Will man execlpe() statt execve() benutzen, so muss man das Python-Skript wie folgt ändern:

import os

env = {"PATH":"/home/bernd/bin2/", "XYZ":"BlaBla"}

os.execlpe("test.sh", "test","abc", env)

statt:

import os

env = {"PATH":"/home/bernd/bin", "XYZ":"BlaBla"}

args = ("test","abc")

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