I have a python script which has two input arguments:
def main(a, b):
c=a+b
return c
if __name__ == '__main__':
main(sys.argv[1], sys.argv[2])
on the other hand I have a c++ code which I need to call this script from one of my functions:
extern "C" std::string call_py(std::string a,std::string b) {
***how to call it and pass a and b to the script.py???***
}
I call my script in console using python3 script.py "Hi" "Bye"