I want to call a function of static PyObject type which I described inside my c program in the inside of that that c program. How to call this function? What will be the (Pyobject self) argument? I understand that the "args" argument will be any module name.
I have tried calling mynewfunction("",Pfunc). Here my mynewfunction is defined as static PyObject mynewfunction(Pyobject *self, PyObject *args). But it did not work. How to call this function from inside of C after PyInitialize()? What I will put in place of *self?
#include <Python.h> static PyObject *string_arr_conversion(PyObject *self, PyObject args){ Pyobject *str_arr; int i; ....... ....... } int main(int argc,char *argv[]){ ............ ............ Py_Initialize(); ............. string_arr_conversion("",pFunc); } here I kept the self argument empty. What we need to put in place of self argument? Or how to call this function in c ?