If you want to use execlpe() instead of execve(), you have to change the python script as follows:
import os
env = {"PATH":"/home/bernd/bin2/", "XYZ":"BlaBla"}
os.execlpe("test.sh", "test","abc", env)
Instead of:
import os
env = {"PATH":"/home/bernd/bin", "XYZ":"BlaBla"}
args = ("test","abc")
os.execve("test.sh", args, env)