← Back to team overview

kicad-developers team mailing list archive

Re: Re: Python support


The problem is that once these Python bindings start coming into the
code, they will have a very significant impact on maintainability and
comprehensibility of the project.
It's a bit too late it *is* already in the code ...

1) How much time did you spend with SWIG?
About a day or two reading all their doc, looking for what I needed, asking people but it still lacks important features that are needed ... (and I don't really want to code it ...)

2) Are you aware that Boost.Python seems to require a different syntax
for various C++ compilers? (Microsoft) And that since it uses C++
templates it will ask more of the C++ compiler, i.e. pushing it?
Give me some examples, since Boost.Python is quite multiplatform, and it compiles fine under gcc, VC, and codewarrior (without being touched ...)

Anyway we only build it under gcc ...

3) If we wanted a very clean binding, it might even make sense to
consider http://sourceforge.net/projects/cxx/ <http://sourceforge.net/projects/cxx/>
never used it ...
Note that I have _a lot_ of experience with interfacing Java to C++,
and that experience tells me that a bolt on approach might not be as
good, long term, as an approach that could make the KICAD classes in
C++ be _fundamentally_ compatible with python.
that's a quite a long job (more than 6months I'd say), so that's an interesting long term approach, but I can not afford it ....

Many things need to be rewritten to follow that ...

Therefore PyCXX, or something like it, at least needs consideration as
well. Let's just consider it and discuss it. We might be able to
tuck a base class underneath the existing C++ classes since they are
all derived from the same base class already.
I have to read more about PyCXX, but I am opened to any discussion...

And if we have not played with SWIG, let's play with it. A couple of
days spent experimenting will help us find the optimal solution.
Have fun, I tried already to find essential features :
- Python callable abstraction (call python code from python)
- Python callback abilities
- exception handling ....
- ability to link against swig (not rebuild it anytime you want to change the interface)

and more I forgot ...

You wouldn't start framing a house until the floor plan is agreed to,
and in fact you wouldn't want the lumber laying around the jobsite,
getting in the way, until the concrete foundation is poured. That
lumber getting in the way is my big concern, long term.
Well, sorry, but we are already painting that house ... Again, any change already implies rewrite...

And yes, I want the nicest house possible.

So do I

Anyway, if you want to discuss about it, pleae feel free to contact me directly : florian DOT delizy AT gmail DOT com (google talk if you use it too), I'm in Paris (CEST+1 timezone)

Follow ups