[PySide] Starting with shiboken

Francisco García public at francisco-garcia.net
Tue Mar 27 07:54:57 CEST 2012

Am 26.03.2012 um 20:48 schrieb Hugo Parente Lima:

> On Monday 26 March 2012 15:18:43 Francisco García wrote:
>> Hello, I am trying to collect as many examples as possible binding C++
>> libraries with Python (cython, ctypes, bost, switg...)
> A good read about bindings: 
> http://setantas.net/pages/bindingcpp.html

OMG! That was complete bindings porno. It really covers the tiny details. I love it!

but still, must face the hello world  type of problem with Shiboken :(

>> First I am trying to do a type of "hello world" for binding. Something like
>> binding this C++ library
>>    int add_these_numbers(int a, int b);
>> however doing that with Shiboken and following the tutorial is not as piece
>> of cake as the others. There are so many steps and files, that it can be
>> overwhelming when compared with the others. I am even trying to avoid
>> CMake, just to get a clear picture of what is going on. I have the feeling
>> that Shiboken is not really hard. Just a lack of more blogs talking about
>> it and more documentation. Also I could I could not find the sources of
>> the tutorial. At least it is not in the shiboken repo.
> Shiboken isn't too easy to start and the lack of documentation just makes the 
> bootstraping harder, so any initiative to create documentation and/or 
> tutorials are welcome.

Well, I am for it ! 

>> where could I download those sources?
> From the tutorial? Which tutorial?

I meant this:

Although the subcategories are confusing:

I could not find the sources of the example within the shiboken repository. Copy/Paste is painful because the numbers cannot be disable.

I am trying to start with a much simpler case and a simple Makefile where I could clearly see the build steps

>> I also saw on the PySide website a comment about the size of the binaries
>> generated by Boost compared against the size generated by Shiboken. It was
>> a good post with a more detailed explanation about the reasons for droping
>> Boost. Does anyone have the link?
> This must be a really old post, because we dropped boost::python more than a 
> year ago, maybe two.

I know it was dropped some years ago. But someone of the team wrote a good post about the reasons and giving real numbers. Like the exact difference of size in the generated binaries. I know boost generates bigger binaries, but it was great having a real case story with real numbers. Sadly I cannot find that now

is this still the right place to ask about shiboken?
is the source code of the tutorial available?
is there an intro more "shiboken for dummies" like me?
is it too hard just dropping CMake and doing all the steps by hand?

More information about the PySide mailing list