so.. let's say i have this C function:
PyObject* Foo(PyObject* pSelf, PyObject* pArgs)
{
MessageBox(NULL, "Foo was called!", "Info", MB_OK);
return PyInt_FromLong(0);
}
and then, I have to do this:
static PyMethodDef Methods[] =
{
{"Foo", Foo, METH_NOARGS, "Dummy function"},
{NULL, NULL, 0, NULL}
};
Py_InitModule("bar", Methods);
and I execute my python script.. but C functions are a little annoying, it's C++ and I use classes for almost everything.
So, is there any way to import member functions from a class to my python script?
oh btw, the python script looks something like this:
import bar
from bar import *
Foo()