I am executing a bash script using subprocess module.
subprocess.call(['temp.sh'])
As per python if the temp.sh file is present it calls the script and it doesn't worry about the success or failure of temp.sh. I want to capture the exit code of temp.sh in order to proceed further with rest of my python script.
os.systemis deprecated. Usesubprocessinstead. – BlueManCZ Sep 16 '20 at 11:25.shat end of files names. It is bad practice, consider what would have to change if you re-wrote the script in python. – ctrl-alt-delor Sep 16 '20 at 13:07