I have a Python module, say module.py, which has several functions like below.
'''module.py'''
def foo():
print("foo")
return 1;
def bar():
print("bar")
return 2;
So far I am able to run a Python script as a whole to some extent. But I want to call foo() from a CAPL function which looks like below.
variables
{
int return_value;
}
void GetFooResult()
{
//insert call to python function here and get the return_value
write(return_value);
}
Is there a way to achieve this? I don’t mind if its complicated but I need some elaboration as I am a novice to CANoe.