python and c++

06/28/2013 18:15 3t3r4n#1
How can i call a python function with a dll created in c++ and injected in m2 client?
Function is in testfile.py and it have name functocall ...

What i tryed:

Code:
PyObject* args = PyTuple_New(0);
PyObject* ret = PyObject_Call(PyObject_GetAttrString(PyImport_ImportModule("testfile"), "functocall"), args, NULL);
Py_DECREF(ret);
Py_XDECREF(args);
testfile.py

Code:
import uiCommon

def functocall():
	alertbox=uiCommon.PopupDialog()
	alertbox.SetText("message")
	alertbox.Open()
It doesn't show the message :(