Miguel-
This is truly awesome! I finally got your repo to build with the attached patch (to revno 3467). Maybe these changes work for you, too? - had to specify python2 in a handful of .py files and in pcbnew's cmakelist (I have both python2 and 3) - added rt to the linker flags (is this because of testing build?) - moved up Python.h in dialog_scripting.cpp, as there were some define conflicts Do you plan on upgrading to python3 at some point? I can help with that if you need an extra hand. I haven't had a chance to look at the available functions yet, but I'm hoping that now I can change a bunch of pad and drill sizes on a board automatically ;) Thanks- -lajos On Sat, Apr 7, 2012 at 1:44 PM, Wayne Stambaugh <stambau...@verizon.net> wrote: > On 4/7/2012 12:08 PM, Miguel Angel Ajo Pelayo wrote: >> >> During the last two days I had some hours to spend on scripting >> again, I've been able >> to fix some memory management problems (objects added to a board or >> module get deleted >> by board/module object, but python tried to delete them too, now that >> condition is detected >> and avoided - .thisown=0 in python during (board/module).Add(object) >> did the work-. >> >> Now we have wxRect and wxSize wrappers, that were missing. >> >> >> I find some important points that I must address (prioritized list): >> >> a) May be working in the KICAD_PLUGIN part for component libraries, >> to move the librairi.cpp >> code into plugin system. There's already some design about that? [I'm >> writing a separate email about this] >> >> This is very very interesting: we cleanup kicad's code (as it's >> planned), and would offer many >> benefits: ability to create footprint wizards, making automated >> component servers/libraries, etc... >> >> b) I should start documenting somewhere how to work with scripting. >> Where's >> the right place? http://kicad.sourceforge.net/wiki/Main_Page ? , or may >> be other place? > > Miguel, > > If this document is only interesting to developers, it may make sense to > put is somewhere in the source repo in the Documentation folder. If > this is something that end users may be interested then the appropriate > place would be the user documentation at > https://code.launchpad.net/~kicad-developers/kicad/doc. This is where > the file format documentation currently lives. Either way, the document > would be under version control which is a good thing. > > Wayne > >> >> >> c) Hook points for scripting inside kicad UI: >> c.1) Dynamic toolbar + hotkey assignment for registered plugins >> c.2) Footprint wizards list, where plugins could be registered. >> c.3) Contextual menu plugins (they could registered, and >> when you right click on some object, they check if they should >> offer their functionality in the list) >> c.4) Scripted DRC plugins >> >> >> >> >> >> >> >> >> >> >> 2012/3/20 Wayne Stambaugh <stambau...@verizon.net >> <mailto:stambau...@verizon.net>> >> >> On 3/18/2012 8:24 PM, Wolfgang Spraul wrote: >> >> But just like the command line argument patch that came in 2 >> >> months ago, there will be a better time to merge this all in. >> > >> > Quick note from the guy who wrote most of the command line patch: >> > I saw the scripting patch and I agree with Dick that this is super >> > important and great work! Well done scripting can probably replace >> > the need for command line options. >> > >> > I will continue to maintain the command-line patches out-of-tree >> > and uplevel 'every few months'. But scripting is definitely the >> > better approach and I'm very happy to see it moving forward. >> > >> > It is in our shared interest to keep the KiCad codebase readable >> > maintainable. >> >> Wolfgang, >> >> Thank you for being patient and understanding the importance of keeping >> the code base readable and maintainable. KiCad is a large project and >> as it continues to grow, the importance of code maintenance cannot be >> under estimated. I wish I could commit more time to the project to >> speed this process along. For now, we'll have to make due. >> >> Thanks, >> >> Wayne >> >> > Cheers, >> > Wolfgang >> > >> > _______________________________________________ >> > Mailing list: https://launchpad.net/~kicad-developers >> > Post to : kicad-developers@lists.launchpad.net >> <mailto:kicad-developers@lists.launchpad.net> >> > Unsubscribe : https://launchpad.net/~kicad-developers >> > More help : https://help.launchpad.net/ListHelp >> > >> >> _______________________________________________ >> Mailing list: https://launchpad.net/~kicad-developers >> Post to : kicad-developers@lists.launchpad.net >> <mailto:kicad-developers@lists.launchpad.net> >> Unsubscribe : https://launchpad.net/~kicad-developers >> More help : https://help.launchpad.net/ListHelp >> >> >> >> >> -- >> >> Miguel Angel Ajo Pelayo >> http://www.nbee.es >> +34 636 52 25 69 >> skype: ajoajoajo > > _______________________________________________ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp
scripting_3467.patch
Description: Binary data
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp