[PyKDE] Is there a SIP tutorial anywhere?
gvermeul at labs.polycnrs-gre.fr
Wed Jul 4 18:12:34 BST 2001
On Wednesday 04 July 2001 09:25, Konrad Anton wrote:
> Hello all...
> Does anyone know of a tutorial or manual or whatever on SIP (besides
> UseTheSourceLuke;) ?
> spoiled-by-the-SWIG-manual-ly y'rs
No, there is no documentation on SIP.
However, I found that transforming *.h into *.sip files is really easy: it is
90 % grunt work (percentage of grunt work increases with the quality
of the class library).
If you're working on linux/unix look at http://gerard.vermeulen.free.fr
and download PyQwt (interface to the Qwt plotting library) for a
shorter example than PyQt itself.
It took me two days to write the *.sip files for this project (great fun,
instant gratification -- more than 95% of the functionality is wrapped).
The difficult part is linking (look at the Makefile in the qwt directory of
PyQwt) and getting the autoconf stuff right (spent more time on autoconf
The best way to proceed, is do the easy stuff first: test and play,
if you are lucky you'll find that you don't need to do the hard part.
IMHO, sip is easier than swig.
PS: oh yes, you don't want to hear it, but I spent some time studying
the source code of sip to understand for instance the calling mechanism
of sipParseArgs() and also the lexer to get an idea of the keywords that
sip is using.
Sip is well written (easy to read for a hobbyist programmer like me).
Gerard Vermeulen -- CRTBT -- BP 166 -- 38042 Grenoble Cedex 9 -- France
TEL: 33 (0)4 76 88 12 53 or 33 (0)4 76 88 12 61
FAX: 33 (0)4 76 87 50 60
More information about the PyQt