Embedding Python in C++
Pecks
gregphillips13 at hotmail.com
Wed Feb 4 11:34:42 EST 2004
More information about the Python-list mailing list
Wed Feb 4 11:34:42 EST 2004
- Previous message (by thread): Advice: socket handling and threads
- Next message (by thread): javadoc for python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I'm having problems embedding Python in C++. (Background - I'm hacking a COTS app written in C++, and I'd like to write in some intelligence in Python) I understand that I can call a python objects method using PyImport_ImportModule, PyObject_GetAttrString and PyObject_CallMethod. But this method relies on the object being declared and initialsed within my Python code. It also depends on hard-coding the name of the python object in the C++ code, which is nasty. Is there a better way of doing this? Is it necessary / a good idea to use Boost or Swig? I'd rather code it by hand using the Python C API if possible. Thanks, Greg.
- Previous message (by thread): Advice: socket handling and threads
- Next message (by thread): javadoc for python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list