Where to look to start writing your own wrappers/bindings

It's quite possible to use sip to generate Python bindings for many types of C++ code, and not just Qt or KDE related code. SIP is most often used to wrap Qt-based third party libraries, like the QWT widgets.

However, Describing that process is beyond the scope of this book. This appendix is meant to help you get to grips with sip, but the fine details of actually building the wrapper library is very platform dependent.

If you want to explore further, download the CVS sources for PyQt (see the Section called Installing sip and PyQt without BlackAdder in Chapter 2, which include the make files for generating C++ files from .sip files (the PyQt source distribution has this done for you already and doesn't include these make files). The CVS sources also contain the qtmod.sip-in file, which is used to tell sip a number of things: the name of the module to build, the .sip files needed to build the module, version control, and the include files and linker information needed to compile a particular set of .sip files into a module Python can use. Since SIP, like PyQt, is open source, you can also look at the sip source code itself. The PyKDE mailing list also includes discussions of sip usage and coding, and is a place where you can post your questions.