I am writing some piece of program which is started by exe.sh. The exe.sh runs all the necessary .sh and .py scripts.
The curent problem I am having is that I do not know how to access some functions which are created by shell script in python.
Here is what I am trying to do:
#shell.sh
function foo
{
echo Foo function called
}
function bar
{
echo Bar function called
}
And then from exe.sh:
./shell.sh
python main.py
And in main.py
import os
os.system("foo")
os.system("bar")
The problem is that I cannot access foo and bar functions with this code. What do I have to do for foo and bar to be accessible by python?