Hi all, I went through a project where I tried (and failed) to wrap my (non-Qt) library using Shiboken on Win7, then moved to pybindgen and had some success. I am not as strong a computer scientist as the authors of these tools (pybindgen, shiboken), but I can share some modest experience.
IIRC pybindgen gets its information by scanning data structures generated by gcc; tools gccxml and pygccxml must be installed for pybindgen to work. In pybindgen, it was not possible to wrap Cpp function signatures that include arrays. In pybindgen, I had challenges to wrap custom exceptions that were subclassed from various Cpp exceptions. In the latter case, my roadblock was understanding how to extend pybindgen's type system to suit my need (maybe better documentation...?). IIRC, during the wrapping process, errors reported from pybindgen were useful, but if the error occurred in a supporting tool (gccxml, pygccxml) then the messages became difficult for me to use. My wrapping workflow uses cmake and the resulting Python extensions work on both Win7 and Ubuntu 12.04 . However to get it all to work, I had to use standard exceptions and also write some Cpp wrappers to avoid returning arrays. Also, I did not use any features where objects are created in Cpp and returned to Python. None of these comments are to discourage the use of pybindgen as a starting point for a coding project, just pointing out some limitations of the present pybindgen. I would read through the pybindgen bug list conversations where the main author comments on issues; I think he has good opinions of the strengths/weaknesses of pybindgen, and likely good suggestions for the best place to invest efforts in the project. Regards, Owen Kelly -----Original Message----- From: pyside-bounces+oekelly=ieee....@qt-project.org [mailto:pyside-bounces+oekelly=ieee....@qt-project.org] On Behalf Of Hugo Parente Lima Sent: January-15-13 3:08 PM To: pyside@qt-project.org Subject: Re: [PySide] Shiboken in python -- was PySide - Qt5 - Swig On Tuesday, January 15, 2013 08:54:51 PM Aaron Richiger wrote: > It looks quite promising, but not widely used and quite inactive. I do > not have enough knowledge about the Qt internals to decide, whether > this could be an approach. > > @Hugo: could you have a quick look at the project description > (especially the things that are impossible with pybindgen) and let us > know, if you can already see a big problem? > http://code.google.com/p/pybindgen/wiki/Features > Or may you tell us somebody else, who is able to filter the available > binding generator options? The list of options is very good indeed, just need to know how it works with C++ multiple inheritance and the mechanisms available to C++ modify/add/remove functions, I found no major problem in the feature list. > If nobody can see a major problem, it could be worth to contact the 3 > authors and ask them. Because before implementing a code generator > ourselves, this could be a nice and performant solution. > Aaron > > Am 15.01.2013 11:51, schrieb Lucas Tanure: > > Can we use http://code.google.com/p/pybindgen/ ? > > > > > > Lucas A. Tanure Alves > > +55 (19) 88176559 > > > > > > _______________________________________________ > > PySide mailing list > > PySide@qt-project.org > > http://lists.qt-project.org/mailman/listinfo/pyside _______________________________________________ PySide mailing list PySide@qt-project.org http://lists.qt-project.org/mailman/listinfo/pyside