Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualDavaris1

Posted 24 May 2013 - 09:24 AM

I made a modification to the start of the CallPlugIn function

 

 

    //PyObject* pluginModule = PyImport_Import(name);
    PyObject* pluginModule = PyImport_ImportModule(PLUGIN_NAME);
 

 

It got me further into the function, but the result string is null.

    const char* resultStr = PyBytes_AsString(resultObj);


 

 

 

Edit:

I tried this code and it got the right result.

    char *cstrret;
    PyArg_Parse(resultObj, "s", &cstrret);
 

 

I used this tutorial:

 

https://www6.software.ibm.com/developerworks/education/l-pythonscript/l-pythonscript-ltr.pdf

 

Its the only one I've found that works.



 


#2Davaris1

Posted 24 May 2013 - 09:22 AM

I made a modification to the start of the CallPlugIn function

 

 

    //PyObject* pluginModule = PyImport_Import(name);
    PyObject* pluginModule = PyImport_ImportModule(PLUGIN_NAME);
 

 

It got me further into the function, but the result string is null.

    const char* resultStr = PyBytes_AsString(resultObj);


 

 

 

Edit:

I tried this code and it got the right result.

    char *cstrret;
    PyArg_Parse(resultObj, "s", &cstrret);
 

 


 



 


#1Davaris1

Posted 24 May 2013 - 09:17 AM

I made a modification to the start of the CallPlugIn function

 

 

    //PyObject* pluginModule = PyImport_Import(name);
    PyObject* pluginModule = PyImport_ImportModule(PLUGIN_NAME);
 

 

It got me further into the function, but the result string is null.

    const char* resultStr = PyBytes_AsString(resultObj);


 

 



 


PARTNERS