Python as scripting plug-in for large C++ project
Bjorn Pettersen
BPettersen at NAREX.com
Sat Apr 27 00:06:12 EDT 2002
I think I've finally convinced our CTO that we should use Python as the
scripting component for a large C++ project with some .NET/ASP thrown in
for good measure :-)
Now come the questions...
- We extensively (exclusively) use our own basic datatypes,
e.g. NInteger which in addition to keeping a value also
stores whether it is NULL (think databases). How much work
is it going to be to expose these to embedded Python?
- Our object/relational mapping tool (written in Python :-)
outputs ~100KLocs of C++ that defines an object tree that
ends in timeseries data ("vectors") or records. The code
is highly optimized and makes sure we keep data integrity.
Would it be simpler to use SWIG/SIP/boost to expose this,
or would it be just as easy to have the mapping tool
generate the Python glue directly.
- Are there any shortcuts, pitfalls, best practices etc. that
we should follow. If anyone has experiences they would like
to share I'd be most grateful.
Needless to say, this is seen as a high risk proposition by management,
but they seem to have confidence in me <wink>, and after four years of
programming Python I have confidence that I can pull this off ;-)
If it matters, we're going to standardize on the 2.2(.1) branch of
Python, and probably stay with it for 12-18 months. If the project is
successful we'll eventually have to ship it to
customer sites (although we would probably go onsite for
installation). Does that pose any additional wrinkles?
Any pointers to documentation other than the extending and
embedding chapters would be helpful, as would pointers to any OS
projects that have allready done something similar...
-- bjorn
More information about the Python-list
mailing list