In python your extension module is the initialization function and This function is called by the Python interpreter when the module is loaded. the function is named initModule.
use the below function in your own module in .py file,
PyMODINIT_FUNC initModule() {
Py_InitModule3(func, module_methods, "docstring...");
}
Below is the description of Py_InitModule3 function
1- func: This is the function to be exported.
2- module_methods: This is the mapping table name defined above.
3- docstring: This is the comment you have to give in your extension.
0 Comment(s)