[PyKDE] SIP issues.

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Sun Dec 5 16:24:13 GMT 2004


On Sun, 5 Dec 2004 09:50:28 +0000
Phil Thompson <phil at riverbankcomputing.co.uk> wrote:

> On Tuesday 23 November 2004 8:51 pm, Gerard Vermeulen wrote:
> > Hi,
> >
> > When trying to wrap QwtPlot3D (http://qwtplot3d.sourceforge.net), I
> > encountered several issues with SIP:
> > (1) Problems in getting an (abstract) virtual operator() working. Finally,
> 
> Virtual (and abstract) operators are now supported in the current SIP v4 
> snapshot. Also operator() and the __call__ slot no longer require 
> %MethodCode.
> 
> > (2) Why does the PyName annotation only apply to functions?
> >     class def { public: double yield; }; can only be wrapped if PyName
> >     can also be used for class names and variable names.
> 
> You can now apply /PyName/ to classes, variables, enums and enum members.
> 
> > (3) Slots like __getitem__, __len__, and __setitem__ of a Python type
> > defined in a SIP file do not show with dir() (dir([]) shows those slots).
> 
> I couldn't reproduce this. I suspect that it had already been fixed in an 
> earlier snapshot.
> 
Thanks, I had seen some of those items already in your changelog.

I am in the business of trying my bindings for QwtPlot3D with your sip-snapshots (I tried
the 3 december sip) and noticed that enum fields are not accessible.
For instance the following snippet from a *.sip file:

enum AXIS { X1, X2, X3, X4, Y1, Y2, Y3, Y4, Z1, Z2, Z3, Z4, }; // enum AXIS

where AXIS is in module scope does not give access to X1, X2, etc.
(there is an AXIS entry in dir(module), but module.AXIS.X1 does not work).

Gerard

 





More information about the PyQt mailing list