← Back to team overview

kicad-developers team mailing list archive

Re: Revised batch plot control file

 

On Tue, Aug 07, 2012 at 04:36:39PM -0500, Dick Hollenbeck wrote:
> ( I have no lisp habits.  Ironic, since I eventually came around to appreciate the
> sexpressions. )

Welcome to the past, then

> Lorenzo, did you invent a programming language?
> I could not tell if this was procedural or not from your comments.  Clearly it is at least
> partly procedural.

Uhm technically it was a 'transfer triggered' machine... the parser sets variables while it sucks the file and at production start/reduce it does the important stuff (open/plot/close). The three element deep stack is a convenience since I found that changing an option most of the times required setting it back later and it was easy to forget to do it.

Is actually trivial since all it is doing is this:
(batch			; Enter 'job level' i.e. does nothing
    (var ...)		; Set option
    (var ...)		; Set option
    (output		; Push option bank
	(var ...)	; Set option
	(var ...)	; Set option
	(layer		; Push option bank, open plotfile if it isn't
	    (var ...)	; Set option
	    (var ...)	; Set option
	)		; Plot layer
    )			; Close plotfile and pop
)			; Leave 'job level' i.e. does nothing

> 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.

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

-- 
Lorenzo Marcantonio
Logos Srl


Follow ups

References