← Back to team overview

kicad-developers team mailing list archive

More on scripting and wx, thanks Edwin!

 

    I'd like to say thanks to Edwin van den Oetelaar, he sent us a patch
yesterday night after experimenting all day long, he managed to make
wxPython work inside of our python bindings, this way we can make the wx
interfaces interact from and to Python scripts.

   It seems that it was already implemented in wxPython, but quite
undocumented (just a little example somewhere).


Some screenshots:

1) This window is 1/2 C++ , 1/2 Python, the python part shows a pycrust
console, with auto completion,
    etc..., I think we could add a pycrust console at the bottom of pcbnew,
hidden by default.


[image: Imágenes integradas 1]


2) Accessing objects

[image: Imágenes integradas 2]

Basic talking to wx (something that crashed previously as wx and wxpython
initialization must be shared, and "wx" library needed to be accessed by
instrospection to our own -pcbnew loaded- library)

[image: Imágenes integradas 1]


Awesome!, Thanks Edwin! :)

-- 

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

PNG image

PNG image

PNG image


Follow ups