InterviewSolution
| 1. |
How Do I Interface To C++ Objects From Python? |
|
Answer» Depending on your requirements, there are many approaches. To do this manually, BEGIN by reading the "Extending and Embedding" document. Realize that for the PYTHON run-time SYSTEM, there isn't a whole LOT of difference between C and C++ -- so the strategy of building a new Python type around a C structure (pointer) type will also work for C++ OBJECTS. Depending on your requirements, there are many approaches. To do this manually, begin by reading the "Extending and Embedding" document. Realize that for the Python run-time system, there isn't a whole lot of difference between C and C++ -- so the strategy of building a new Python type around a C structure (pointer) type will also work for C++ objects. |
|