← Back to team overview

kicad-developers team mailing list archive

Re: Default location for Python plug-in scripts on OS X?

 

These are the default paths which I have added or adapted from previous code some while back:
    // User scripting folder (~/Library/Application Support/kicad/scripting/plugins)
    pypath = GetOSXKicadUserDataDir() + wxT( "/scripting/plugins" );

    // Machine scripting folder (/Library/Application Support/kicad/scripting/plugins)
    pypath += wxT( ":" ) + GetOSXKicadMachineDataDir() + wxT( "/scripting/plugins" );

    // Bundle scripting folder (<kicad.app>/Contents/SharedSupport/scripting/plugins)
    pypath += wxT( ":" ) + GetOSXKicadDataDir() + wxT( "/scripting/plugins" );

    // Bundle wxPython folder (<kicad.app>/Contents/Frameworks/python/site-packages)
    pypath += wxT( ":" ) + Pgm().GetExecutablePath() +
              wxT( "Contents/Frameworks/python/site-packages" );

    // Original content of $PYTHONPATH
    if( wxGetenv("PYTHONPATH") != NULL )
    {
        pypath = wxString( wxGetenv("PYTHONPATH") ) + wxT( ":" ) + pypath;
    }
I must confess though, that I never did really test it because
* the latest build with Python enabled had issues with hotkeys in the editor (all hotkeys got eaten and didn’t appear in the Python console)
* I didn’t have any idea on how to use scripting…


Regards,
Bernhard


> On 03 Mar 2015, at 20:52, Nick Østergaard <oe.nick@xxxxxxxxx> wrote:
> 
> On linux it is in $HOME/.kicad_plugins/
> 
> 2015-03-03 20:26 GMT+01:00 Andy Peters <devel@xxxxxxxxx>:
>> Subject says it all ...
>> 
>> I enabled Python scripting in my OS X builds and wanted to try the footprint plug-in, but I don't know where pcbnew looks for the scripts, and it thinks none are available.
>> 
>> I'm on BZR 5469.
>> 
>> Say thankya.
>> 
>> -a
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help   : https://help.launchpad.net/ListHelp
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References