← Back to team overview

kicad-developers team mailing list archive

Re: more pythonic scripting API for pcbnew

 

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.


Miguel Ángel Ajo


On Wednesday, 7 de January de 2015 at 22:10, LordBlick wrote:

> In response to a message written on 07.01.2015, 21:54, from Wayne Stambaugh:
> > On 1/7/2015 3:44 PM, LordBlick wrote:
> > > In response to a message written on 07.01.2015, 20:48, from Adam Wolf:
> > > > I have to stop responding to this thread, but it's official Python policy
> > > > that spaces are preferred over tabs, and has been for a while.
> > > > https://www.python.org/dev/peps/pep-0008/#tabs-or-spaces
> > > >  
> > >  
> > > OK, I appreciate that, but my heart goes on tabs… :P I leave policies to
> > > politicians. I like the programing mainly because it is one of the few
> > > oases of freedom in modern times. Also freedom of choice of indentation
> > > sign… :P Enforcing „One correct way” is sign of civilization falling.
> > > Diversity is a basic rule of survival.
> > >  
> >  
> >  
> > For your own personal code, the sky's the limit as far as formatting goes.
> > Any code included in the KiCad source must follow the coding policy. I
> > doubt the KiCad coding policy has much influence on the overall health of
> > civilization ;).
> >  
>  
> I do not intend to violate any of the sacred rules of KiCAD congregation, my
> code will be published off-project, and here I'll just kindly inspired you all... ;)
> --  
> Best Regards,
> LordBlick
>  
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx (mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx)
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>  
>  



Follow ups

References