Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to initialization the function in python

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 539
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: