Your patch fails to build using swig 3.0.6 on windows due to the
comments you added to kicadplugins.i. Here is the output:
C:/msys64/home/wstambaugh/src/kicad/product/pcbnew/../scripting\kicadplugins.i(101)
: Error: Unknown SWIG preprocessor directive: The (if this is a
block of
target language code, delimit it with %{ and %})
C:/msys64/home/wstambaugh/src/kicad/product/pcbnew/../scripting\kicadplugins.i(105)
: Error: Unknown SWIG preprocessor directive: The (if this is a
block of
target language code, delimit it with %{ and %})
C:/msys64/home/wstambaugh/src/kicad/product/pcbnew/../scripting\kicadplugins.i(109)
: Error: Unknown SWIG preprocessor directive: The (if this is a
block of
target language code, delimit it with %{ and %})
C:/msys64/home/wstambaugh/src/kicad/product/pcbnew/../scripting\kicadplugins.i(113)
: Error: Unknown SWIG preprocessor directive: And (if this is a
block of
target language code, delimit it with %{ and %})
C:/msys64/home/wstambaugh/src/kicad/product/pcbnew/../scripting\kicadplugins.i(118)
: Error: Unknown SWIG preprocessor directive: NOTE (if this is a block
of target language code, delimit it with %{ and %})
pcbnew/CMakeFiles/_pcbnew.dir/build.make:61: recipe for target
'pcbnew/pcbnewPYTHON_wrap.cxx' failed
I tried using the recommended %{ %} to wrap the comments. It built
fine
but crashed when I ran it. Your best bet is to get rid of the
comments
or figure out the proper swig technique for wrapping python
comments. I
tried removing the comments and it worked fine. You also have some
coding policy violations ( missing spaces before and after
parenthesis )
that need to fixed.
On 12/16/2015 5:58 AM, Strontium wrote:
Hello List,
I believe I have cleaned up my patch and made the enhanced shell do
everything it should.
It has a tabbed interface, with simple text editing capabilities.
Its GUI can be used to introspect the full internal state of
pcbnew, as
exposed by the python interface.
The editor can be used to code python scripts (with syntax
highlighting), and it has auto-completion built in. Ie, type word
press
(dot) and it gives you a list of possibilities which follow. Further,
you can use the editor to load up KiCad files and edit them without
having to use an external editor, if one desires.
It will allow you to save your interactive history, and restore it
in a
new session. It has a startup file which is executed when the python
shell first starts, and automatically creates a default if it doesn't
exist. All of its configuration, history and startup files are
stored
in the users KiCad configuration directory on each platform.
The default startup file doesn't do anything, but includes a
commented
out example which will automatically load pcbnew into the shell,
and get
the current board on screen. Two very common things that need to be
done most times when you start the python shell.
The shell is fully written in python, and uses the foundation of
PyAlamode included with wxpython. It does not introduce any further
dependencies on KiCad, everything it achieves is already built into
KiCad, and not currently exposed.
It should be possible to extend the shell in future and add features,
without requiring to hack core code inside pcbnew.
The changes to the core of pcbnew, that I did, were to facilitate
this,
and I discuss why I did them in earlier posts. They haven't
changed in
this patch. There may be better ways to achieve this and I am
open to
suggestions.
I have only tested on Linux, but I do not believe any of the OS
specific
code changes that I made should negatively effect Windows or Mac,
nevertheless it needs testing on those platforms and I do not have
access to them.
Screenshots of it in action:
http://i.imgur.com/lTFFddR.png
http://i.imgur.com/qbACtPR.png
http://i.imgur.com/Yny4Lnc.png
http://i.imgur.com/q2AjrPi.png
The code is also available on my github:
https://github.com/stevenj/kicad-source-mirror/tree/enahnced-python-shell
Hopefully this is useful.
Steven
_______________________________________________
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