example code to access some C++ classes in a DLL

T

Torsten Mohr

Hi,

i have written a DLL that implements some C++ classes and
their methods. Now i would like to make the classes and
their methods known to python.

Is there some example code available on how to do this?
I want to make some classes, their constructors and some
methods known to python.

I've read the python docu "Tutorial", "Distributing Python Modules",
"Extending and Embedding" and "Python/X API".
But none of them seems to tell me how i can interface to:


namespace abc {
class Abc {
Abc();
~Abc();

int meth1(int abd, std::string s);
};

class Def {
Def();
~Def();

int meth1(long abd, char* g);
}
}

Has anybody got some example code for the necessary wrapper to make
all the above known to python?


Thanks for any hints,
Torsten.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top