kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #16250
Re: more pythonic scripting API for pcbnew
On 07.01.2015 11:36, PTT wrote:
> Dear all,
> First of all thanks for all the good work, I recently switched to KiCAD
> because of the added scripting support which I needed for scripted button
> placement on a pcb.
>
Hi Piers,
Very nice work, thanks! IMHO C++ APIs SWIGgged directly to python are
rather big and inelegant and such a wrapper makes writing scripts much
easier!
Are you intending to continue working on your wrapper? I vote for
including it in future Kicad releases along with some examples. Miguel,
Wayne - would you agree?
Cheers,
Tom
> To make it easier to get my work done I made some convenience functions and
> classes wrapping the swig api to have a cleaner interface.
>
> Please have a look and see if it is useful to somehow incorporate it in the
> main branch.
>
> pcbnew_easy.py
> https://gist.github.com/pierstitus/7be2d9923da502c88ff1
>
> There is a simple usage example, to run put the file on your path, (or add
> the path with sys.path.append("...path_to_file..."))
> open the pcbnew console and enter
>>>> import pcbnew_easy
>>>> pcbnew_easy.test()
> (the screen is only updating on moving)
>
> Piers
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References