[PyKDE] Any tools to generate sip files?

Jim Bublitz jbublitz at nwinternet.com
Fri Mar 14 18:29:00 GMT 2003


On 14-Mar-03 Frederick Polgardy Jr wrote:
> Well, whereas SIP looks at SIP files (a stone's throw from the
> C++ header file) and generates C++ bindings, I could imagine it
> wouldn't be *extremely* painful to write a utility like SIP to
> generate Boost code from the headers, or a slightly modified
> version thereof, instead. Not saying  I'm going to write it
> myself :), but the point was only that the limitation 
> doesn't lie with Boost itself.

Not having looked at Boost lately I'm not sure how difficult it
would be, but it's probably doable. I guess my point was that sip
already does this and Boost doesn't.
 
> The bigger issue re: Qt/KDE is that I have no idea how you'd
> handle the signal/slot mechanism without having preknowledge
> about it, like SIP does.

Again I'm not familiar enough with Boost to be certain, but it
seems that Boost sits "on top of" the C++ code while sip calls into
the C++ code - so, for example, Boost can handle templates more
easily than sip can. Signal/slot handling might be easier too since
at the C++ level Qt already knows how to do it - it might be just
another method call to Boost.

It seems to me the biggest difference though is that sip by design
handles a comprehensive set of bindings over a number of versions
very well, while Boost is designed more to add a Python feature to
your C++ code. sip excels at PyQt and PyKDE, but for a lot of
applications sip is overkill and Boost is probably more suitable.

Jim




More information about the PyQt mailing list