← Back to team overview

kicad-developers team mailing list archive

PATCH kicad-python-support.patch Python Binding Start

 

------=_Part_46932_23388003.1176923883942 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Here is a patch to add the base of Python binding to kicad ( I am still
working on it), it applies on the last stable kicad release.

Please let me know your impressions and comments (in the hope that it will
be usefull).

(for now only linux/gtk is supported)

next step is to add bindings as much as possible to script kicad:

---
3d-viewer/makefile.gtk | 1
3d-viewer/makefile.include | 2
common/edaappl.cpp | 14 ++++
common/makefile.include | 8 ++
common/pyhandler.cpp | 134 ++++++++++++++++++++++++++++++++++++++++++
cvpcb/makefile.include | 2
eeschema/makefile.include | 2
eeschema/plugins/makefile.gtk | 2
gerbview/makefile.include | 2
include/appl_wxstruct.h | 1
include/pyhandler.h | 43 +++++++++++++
kicad/makefile.include | 2
libs.linux | 17 ++++-
pcbnew/makefile.include | 2
share/infospgm.cpp | 11 +++
15 files changed, 233 insertions(+), 10 deletions(-)

This patch adds a PyHandler class to handle all python bindings, and modify
the build system (currently only for linux gtk) to handle python 2.4 libs

to compile with python you'll first need to have boost.python installed on
your system (with its dev files) as well as python itself, then edit
libs.linux
and set KICAD_PYTHON to 1 (or to anything)

then you'll just have to build it

At running time, kcad now looks for a script 'scripts/kicad_startup.py' in
it's data directory, and 'scripts/.py', where is the app name, then run all
those scripts.
There is currently nothing exposed from Kicad to Python (more to come)
 ------=_Part_46932_23388003.1176923883942 Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Here is a patch to add the base of Python binding to kicad ( I am still working on it), it applies on the last stable kicad release.<br><br>Please let me know your impressions and comments (in the hope that it will be usefull).
<br><br>(for now only linux/gtk is supported)<br><br>next step is to add bindings as much as possible to script kicad:<br><br><br>---<br>
3d-viewer/makefile.gtk | 1 <br>
3d-viewer/makefile.include | 2 <br>
common/edaappl.cpp | 14 ++++<br>
common/makefile.include | 8 ++<br>
common/pyhandler.cpp | 134 ++++++++++++++++++++++++++++++++++++++++++<br>
cvpcb/makefile.include | 2 <br>
eeschema/makefile.include | 2 <br>
eeschema/plugins/makefile.gtk | 2 <br>
gerbview/makefile.include | 2 <br>
include/appl_wxstruct.h | 1 <br>
include/pyhandler.h | 43 +++++++++++++<br>
kicad/makefile.include | 2 <br>
libs.linux | 17 ++++-<br>
pcbnew/makefile.include | 2 <br>
share/infospgm.cpp | 11 +++<br>
15 files changed, 233 insertions(+), 10 deletions(-)<br>
<br>
This patch adds a PyHandler class to handle all python bindings, and
modify the build system (currently only for linux gtk) to handle python
2.4 libs<br>
<br>
to compile with python you&#39;ll first need to have boost.python installed
on your system (with its dev files) as well as python itself, then edit
libs.linux<br>
and set KICAD_PYTHON to 1 (or to anything)<br>
<br>
then you&#39;ll just have to build it <br>
<br>
At running time, kcad now looks for a script &#39;scripts/kicad_startup.py&#39; in it&#39;s data directory, and &#39;scripts/.py&#39;, where is the app name, then run all those scripts.<br>There is currently nothing exposed from Kicad to Python (more to come)
<br><br>
 ------=_Part_46932_23388003.1176923883942--------=_Part_46931_758048.1176923883942 Content-Type: text/x-patch; name="kicad-python-support.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="kicad-python-support.patch"
X-Attachment-Id: f_f0o5z8pf

U3ViamVjdDogW3BhdGNoIEBudW1AL0B0b3RhbEBdIEBuYW1lQCBQeXRob24gQmluZGluZyBTdGFy
dAoKLS0tCiAzZC12aWV3ZXIvbWFrZWZpbGUuZ3RrICAgICAgICB8ICAgIDEgCiAzZC12aWV3ZXIv
bWFrZWZpbGUuaW5jbHVkZSAgICB8ICAgIDIgCiBjb21tb24vZWRhYXBwbC5jcHAgICAgICAgICAg
ICB8ICAgMTQgKysrKwogY29tbW9uL21ha2VmaWxlLmluY2x1ZGUgICAgICAgfCAgICA4ICsrCiBj
b21tb24vcHloYW5kbGVyLmNwcCAgICAgICAgICB8ICAxMzQgKysrKysrKysrKysrKysrKysrKysr
KysrKysrKysrKysrKysrKys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bHNlOworCX0KKworCWZjbG9zZSggZmlsZSApOworCXJldHVybiB0cnVlOworfQorCit2b2lkIFB5
SGFuZGxlcjo6U2V0QXBwTmFtZSggY29uc3Qgd3hTdHJpbmcgJiBuYW1lICkKKy8qIFNldCB0aGUg
YXBwbGljYXRpb24gbmFtZSBpbiB0aGUgcHl0aG9uIHNjb3BlICovCit7CisJbV9hcHBOYW1lID0g
bmFtZTsKKyAgICBvYmplY3QgbW9kdWxlKCggaGFuZGxlPD4oYm9ycm93ZWQoUHlJbXBvcnRfQWRk
TW9kdWxlKCJfX21haW5fXyIpKSkpKTsKKyAgICBvYmplY3QgbnMgPSBtb2R1bGUuYXR0ciggIl9f
ZGljdF9fIiApOworCXRyeSB7CisJCW5zWyJraWNhZEFwcCJdID0gc3RkOjpzdHJpbmcoIG5hbWUu
VG9Bc2NpaSgpICk7CisJfQorCWNhdGNoIChlcnJvcl9hbHJlYWR5X3NldCkKKwl7CisJCVB5RXJy
X1ByaW50KCk7CisJfQorfQorCitjb25zdCBjaGFyICogUHlIYW5kbGVyOjpHZXRWZXJzaW9uKCkK
K3sKKwlyZXR1cm4gUHlfR2V0VmVyc2lvbigpOworfQorLy8gdmltOiBzZXQgdGFic3RvcD00IDoK
SW5kZXg6IGtpY2FkLWRldi9pbmNsdWRlL3B5aGFuZGxlci5oCj09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIC9kZXYv
bnVsbAkxOTcwLTAxLTAxIDAwOjAwOjAwLjAwMDAwMDAwMCArMDAwMAorKysga2ljYWQtZGV2L2lu
Y2x1ZGUvcHloYW5kbGVyLmgJMjAwNy0wNC0xOCAyMDo1NDoyNi4wMDAwMDAwMDAgKzAyMDAKQEAg
LTAsMCArMSw0MyBAQAorCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCS8qCQkgIHB5
aGFuZGxlci5oCQkqLworCS8qKioqKioqKioqKioqKioqKioqKioqKio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