kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #31693
Re: tiny Patch: fix board.Save() breakage in Python scripting
-
To:
kicad-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Fri, 17 Nov 2017 12:55:20 -0500
-
In-reply-to:
<CAEQqtJyjnVnUds=HKecEOMvzoub3LPPQAYuZ6GjCKUmguuOimQ@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
A better option might be to expose the PCB_FILE_T enum so that they can
be used directly by the python scripting. The other option is to use
pcbnew.IO_MGR_EnumFromStr( "Legacy" ) to fetch the enum. Of course if
there is no reason to ever save a board file in any other format than
the kicad sexpr format, than your patch is fine. Any python script
writers out there have an opinion on this before I commit this patch?
Cheers,
Wayne
On 11/16/2017 12:07 PM, Henner Zeller wrote:
> Hi,
> While playing around with the Python API, I noticed that saving a
> board didn't work.
> Apparently there was a parameter IO_MGR.KICAD passed internally that
> the interpreter didn't know about.
>
> The attached patch fixes it, but I have no idea if this is the
> 'correct' way to do it.
>
> Cheers,
> Henner
>
>
>
> _______________________________________________
> 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
>
References