KiCAD on OS X - How to use python scripts?

Hi there,

I’ve be struggling 4 hours in front of my Mac OSX this afternoon to get python plug-ins work and especially the “” and the teardrops effect.

I copied the *.py files in ~/Library/Preference/Kicad/scripting/ and try to call it from the python script console but didn’t manage to make it work.

What did I wrong ? didn’t find any old topics or FAQ for that.

Any help would be greatly appreciated.


My config.
Application: kicad
Version: (5.0.0-3-g5ebb6b6), release build
_ wxWidgets 3.0.4_
_ libcurl/7.54.0 LibreSSL/2.6.4 zlib/1.2.11 nghttp2/1.24.1_
Platform: Mac OS X (Darwin 18.2.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
_ wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)_
_ Boost: 1.67.0_
_ OpenCASCADE Community Edition: 6.9.1_
_ Curl: 7.51.0_
_ Compiler: Clang 8.0.0 with C++ ABI 1002_

Build settings:

Not a solution, but if it’s any consolidation, I’ve postponed even trying to do anything with scripting in KiCad untill everything Python 2 related is gone and forgotten.

About teardrops:
These are most usefull for connectors subject to mechanical stress. In the Olinuxino 64 (Project in “Made with KiCad” and on Github) they seem to have solved it by drawing short thick fat tracs from the THT connector for a few mm before continuing with a thin track.

A few pointers;

  1. Your version of kicad is now quite old - the current version on macOS is 5.1.2 and this introduces a large number of bug fixes and stability improvements.
  2. The version that you have (5.0.0) seems to have been compiled with KICAD_SCRIPTING_ACTION_MENU=OFF
    which might explain some of your problems. Scripting was included in 4.0.7 and then excluded from some early 5 builds but I can confirm that the current 5.1.2 version has this enabled.
  3. The plug-ins are not called from the command line. There is a separate menu - which probably isn’t showing on your version as the ACTION_MENU is OFF.
  4. The install path is not quite correct - note the caps and spelling (I expect this is just a typo after your 4 hrs of frustration :slight_smile: )
1 Like

Dear John_Pateman,

You made my day.

I installed the latest version (5.1.2),
copied the file in the `~/Library/Preferences/kicad/scripting/,
saw the ACTION_MENU button available
and tada !

So, great thanks !
By the way, is there a site with the “best”/usefull plugins ?

Have a nice day,

La Souplesse,

Not specifically for action scripts but this is a useful reference for various Kicad ‘extras’. I think Orson said something at KiCon about considering a plugin repo but it is still in the discussion stage.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.