kicad-developers team mailing list archive
Mailing list archive
Re: Regression Testing
On Wed, May 01, 2013 at 02:45:15PM +0200, Edwin van den Oetelaar wrote:
> Ah, I do not have this experience, can you cite a reference or provide
> an example of this please, it could be incidental.
Try the demo in wxwidgets. I think that python would be fine for some
thing and too slow for others. Like I already said I would have no
problem with python utilities or reports but I fear that for things used
'intensively' it would be a nuisance.
> 'Difficult to see. Always in motion is the future' you might be right there.
Nope, is more like a philosophical issue of python, I fear. Python seems
to be done more for be extended than to be embedded i.e. it wants to
rule; the objects in pcbnew are not designed for being called from
outside (i.e. created or managed) so there are some serious lifecycle
issues. Once python has an old on an object it's not safe anymore to
delete it *and* you can't know it has an old to it (that's because, by
design, objects should be managed by the python collector).
In short, it works but you need to be *very* carefully (to be sure you
shouldn't save references anywhere). Speed example: GetBoard in python,
put it in a variable. File/New. Try to use the object. Too bad, it was
Mind me, it's not a python issue, is the impedence mismatch between
memory manager (manual vs reference counted, IIRC), it would happen even
with LUA if you wouldn't be careful to register and unregister each
object you use.
Other than that it works, just be sure to not call too internal stuff
(since *everything* is exported:D)