Boost.Python, PyRex or SWIG

I’ve got a C++ framework that I’ve been working on for a while that I would like to access from python so my choices are either Boost.Python, PyRex or SWIG. SWIG is kind of low level and I would have to write a another package that sits on top of it to bring the framework back into an object oriented framework I suppose. So any thoughts?

if this is not related to blender
ask this on the python mailing list.

http://mail.python.org/mailman/listinfo/python-list

Hello,

I think PyRex is only for converting python code into c-code. It can be used to speed up the script, when time consuming operations are placed in the c-extension.

I tried Boost.Python some time ago. On the first look it seams to be a uncomplicate way to make an extension for Python. But I had have several problems to include some lib files. For me it was very dificult to use and I didn’t found the documents I needed.
Anyway there are much documents on Boost.Python.

I have no experience with SWIG. It seams to be a alterative to Boost.Python with the same complexity

BUT, there is alltougth a 4. way. I used it and it works fine. Python has allready the ability to convert c-code or libs into Python extensions. It is know as distutils http://docs.python.org/dist/dist.html
The documentation is very good. It creates packages to install your extensions one every computer. All you need to do is to write a wrapper to handle between Python-objects and c-datatyps.

PS: When you found a easy way to use Boost-Python with libs please let me kmow.

My usual place for questions like this was down at the the time (gamedev.net) so figured I would try here.

For now I’m either going to write the whole app in python or write a C style interface into the library I was going to use then use that from PyRex. But thanks for the advice though