Pythoning of C++ objects

Phil Thompson phil at river-bank.demon.co.uk
Mon Oct 11 17:04:38 EDT 1999


On Sun, 10 Oct 1999, Mikhail Astafiev wrote:
>Hi folks,
>
>My problem is as follows:
>
>There is a C++ data processing class library. I have to write Python
>extension allowing to manipulate C++ objects and call their methods
>from Python. I don't want to use CXX - I want to write something more
>lightweight.
>
>Could anybody point/send some example/documentation/comments on
>porting C++ classes to Python?

Another alternative is SIP which is used to generate the PyQt/PyKDE bindings.  I
wrote it because I didn't think SWIG was really up to it for C++.  SIP
supports abstract classes, virtual functions, access to protected functions. 
You can find it at http://www.river-bank.demon.co.uk/software.

The only problem is that I haven't got round to documenting it yet (although
that's not stopped others using it).  The PyQt/PyKDE specifications are good
working examples.

Phil




More information about the Python-list mailing list