Import Python Class/methods into C++

K

Keith Moore

I'm a Python newbie,

Can anyone show me an example of how to import a python class into a C++
program?
I am able to use PyImort_ImportModule to import a module, and
PyObject_GetAttrString to import the function from the module.
Now I converted that module to a class. I need to import methods from that
class into my C++ program.

Help!!!

Keith
 
S

Stefan Behnel

Keith said:
Can anyone show me an example of how to import a python class into a C++
program?
I am able to use PyImort_ImportModule to import a module, and
PyObject_GetAttrString to import the function from the module.
Now I converted that module to a class. I need to import methods from that
class into my C++ program.

Have you tried elmer?

http://elmer.sourceforge.net/

Stefan
 

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
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top