← Back to team overview

kicad-developers team mailing list archive

Re: Python binding of enums


On Thu, Aug 09, 2012 at 09:20:56AM -0500, Dick Hollenbeck wrote:
> I think this means including more C++ headers into the *.i files to pick up the C++ enums
> and defines.

SWIG seems to already pick up enums, for examply you can type
pcbnew.ALL_CU_LAYERS and you get 65535

Maybe there is some .i incantation to provide for generation of all the
objects (but still doesn't work for everything... what about these field which actually
are bitmaps like the eda attribute)

If the code would be splattered of ifdefs then I'd prefer the
check-and-throw strategy which at least give extra robustness to the

Lorenzo Marcantonio
Logos Srl