[C++-sig] Advice sought on making a large C++ application a Python extension
David.Aldrich at EU.NEC.COM
Mon Sep 6 17:15:39 CEST 2010
We have a large C++ application that we develop in-house. It consists of a large number of source files, some of which are linked directly and some of which are first built as static libraries.
It has been suggested that we make the application's functionality available as a Python extension. Simplistically speaking, we could then let users replace our C++ main() by a Python script.
I have only looked at the boost.python tutorial that demonstrates a 'Hello world' Python extension. For our project we would be dealing with something very much bigger, with many classes, singleton classes and (possibly) global data. My question is, would it be practical to make all of those entities Python extensions?
We would also want to continue to support the application as a wholly C++ application. Currently, we use gnu make to build it. Would I have to add a parallel build system using bjam to build the extensions? And then maintain both make's makefiles and bjam's Jamroot files?
Can .pyd files be loaded by the C++ linker?
Any advice would be gratefully received.
David Aldrich, NEC Telecom MODUS, Ltd,
Cleeve Road, Leatherhead, Surrey, KT22 7SA, UK
Direct tel. +44 (0) 1372 381857
More information about the Cplusplus-sig