i want to execute bash function in a script and i want to print the return function.
this is my current code
function myfunct() {
return 1
}
and my python code:
process = subprocess.Popen(['bash', '-c', '. myscript.sh; myfunct'])
output, error = process.communicate()
print(output)
i have "None" output, i want 1 output