I'm trying to automate the process of sourcing petalinux tools in order to run bash commands like "petalinux-build" from python.
However I have not succeeded with my approach. I read some articles stating it is not possible to use "source" from python via subprocess or os calls.
I have tried using subprocess family of functions like Popen,call and check_output but none of them seem to work.
subprocess.Popen(['source /auto/xlnx/current_petatools/settings.sh'], shell=True)
subprocess.call(["petalinux-build"], shell = True)
I expect sourcing the petalinux tools works so I can run its family of commands in the environment.