header image
 

Python Travels

As I meander down the boost Python road I’m currently travelling on, I’ve found it useful to refer to a Python Quick Reference for the special methods of classes. Operator overloading is also covered here from a boost perspective. One thing is clear, boost Python has appalling documentation.

One issue I had early on with boost Python is if I want to expose a C++ class via an interface? What C++ code should I write for the init def method in the class_ declaration given that IVolSurface is abstract and the concrete class is VolSurface?

python::class_<eq::IVolSurface>(“VolSurface”) .def(init<…&gt ;) … ;

~ by mdavey on February 15, 2006.

2 Responses to “Python Travels”

  1. Why did you go the boost Python route in the first place?

  2. We needed cross platform scripting, and some of the traders already used Python

Leave a Reply