I have a bash script in which I have a function like this
configure()
{
echo $1
echo $2
return 0
}
And I am calling this function directly like this from my python file
subprocess.Popen(
['bash', ' -c', '. test.sh; configure 1 2'])
now I want to get return value from this function and in case there is some error I want to catch that as well.