Orange Forum • View topic - Boost Python

Boost Python

A place to ask questions about methods in Orange and how they are used and other general support.

Boost Python

Postby Tom » Tue Sep 04, 2007 21:19

I've used boost python to wrap c++ and had a quick read of how orange wraps c++. Could you comment on the pros and cons of using boost python compared to your methods... I not an expert in this area but before I start wrapping code I would like to have an idea of the trade offs of each method..

Thanks

Postby Janez » Wed Sep 05, 2007 14:35

I don't know a thing about boost python, except that it exists and can wrap C++ methods.

I know a little bit - but a very little bit - about swig and I know that it can annoyingly change from version to version, since I have to port some old interface definitions not long ago. Apart from that it looks great.

I know even less about Sip, which is used for wrapping Qt, but what I know is that it apparently cannot wrap class member variables, so you have to access them through member functions (which is generally a good idea anyway).

I like our wrappers because the resulting interface is very Python friendly (but swig's might be just as good), we have a complete control over it and can add new functionality as it will (we could do so with any other wrapper, though, but we know this one really well). It might require more manual programming than swig, but I'm not really sure about that.

All in all, we will stick to our interface. If you want to add extensions to Orange which will be tightly integrated with it, using our interface is about the only way to go. If you are doing something else or you don't care if the data between Orange and your module is transmitted via native Python structures, you should go for swig or boost python, I guess.


Return to Questions & Support



cron