← Back to team overview

kicad-developers team mailing list archive

Re: more pythonic scripting API for pcbnew

 

In response to a message written on 07.01.2015, 23:07, from Miguel Ángel Ajo:
Hi Lordblick, sorry, I was on a run before, and I actually didn’t look
into your code, but stepped into tabs vs spaces (thinking it was a discussion
about in-KiCad code).

Your python extra layer is very nice, actually, at the start I was very reluctant
on adding another layer and reusing the C++ interface as much as possible,
and, even if that’s cheaper, it has a lot of disadvantages:

1) Resulting code is not very pythonic, and hard to read.

2) If C++ implementation changes, the available python scripts break.

3) The auto generated documentation is poor, if we had a python mid-layer,
      we could have very nice documentation rendered by sphinx or any equivalent
      pythonic solution.

I must say, that it sounds like an interesting step, and quite motivating,
if other people wanted to join forces on this, and discuss about what would
be an ideal interface (your implementation seems like a very nice start point
to start discusion), I’d love to spend some time on it and re-join forces back
to KiCad development.
Regardless that I'm different person than PTT, I think that some of most useful code pieces (in example LayerSet with modified by me get_layer()) could be included in swig staff…

--
Best Regards,
LordBlick


Follow ups

References