← Back to team overview

kicad-developers team mailing list archive

Re: Revised batch plot control file

 

Hi :)

2012/8/8 Lorenzo Marcantonio <l.marcantonio@xxxxxxxxxxxx>:
> On Tue, Aug 07, 2012 at 04:36:39PM -0500, Dick Hollenbeck wrote:
>> Had you considered simply having a all required options exposed via the scripting API, and
>> then simply using python to drive exactly the same functionality?  What were the downsides
>> to that approach?  That is, literally a python program at the command prompt.

I think that both options can have it's value, for example those .pctl
files are useful to people not interested
in learning python, and python interface can be great for more
complicated needs (they will exist even if
we don't see them).

>
> As I said in another mail you only have to bind the pcb options class and a couple of methods to have all this running from python. At the moment a) I'm not following the scripting branch and b) I have no idea on how stuff talk to python:P
>
> The biggest downside is that I have to switch and merge to the python branch into mine and I have *no idea* on how to do that in bzr :P:P
>

I can provide help at that point. Anyway the short version is:

* Provide a C++ interface (via classes or functions) [probably what we
already have, the simpler the better]
* Then create a .i that %include / #include the .h to that file from
the pcbnew/scripting directory,  [1]
* Then include your new .i at the end of
http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/view/head:/pcbnew/scripting/pcbnew.i



[1] You can also extend C++ classes (without touching C++ code itself)
with extra python code, to make scripting easier:
     example:  http://bazaar.launchpad.net/~kicad-testing-committers/kicad/testing/view/head:/pcbnew/scripting/board.i


But, as I was telling you, once it's in testing I can get it visible
(+tuned) for the scripting layer.


Greetings! :)

-- 

Miguel Angel Ajo Pelayo
http://www.nbee.es
+34 636 52 25 69
skype: ajoajoajo


Follow ups

References