← Back to team overview

kicad-developers team mailing list archive

more pythonic scripting API for pcbnew

 

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.

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

Follow ups