[GRASS-dev] RE: [GRASS-user] Question with Python-SWIG example
[SEC=UNCLASSIFIED]
Glynn Clements
glynn at gclements.plus.com
Tue Jun 1 09:56:58 EDT 2010
Markus Neteler wrote:
> > I've already replaced the SWIG bindings in 7.0 with the ctypesgen
> > version.
> >
> > Ideally, I'd like to do the same in 6.x in time for 6.4.0, so that we
> > can forget that the SWIG version ever existed. The main issue there is
> > the vdigit and nviz modules in the wxPython GUI (which don't work on
> > Windows in any case). I haven't tried using ctypesgen for C++, though.
>
> Is the ctypes usage in GRASS 7 now sufficiently implemented that a
> backport to GRASS 6 could be started?
Yes.
At present, the only part of GRASS that uses the ctypes wrappers is
the wxNVIZ module. gui/wxpython/gui_modules/wxnviz.py replaces the C++
grass7_wxnviz module from the gui/wxpython/nviz directory (which is
still present in 7.0, but disabled).
SWIG is still required for the vdigit module, but only for its own C++
component; it doesn't use the wrappers for the libraries. That
probably can't be changed in time for 6.4.0; wxPython is SWIG-based,
and vdigit relies upon the ability to pass wxWidgets objects (pens,
brushes, DCs) between wxPython and the vdigit module via Python.
In the longer term, we should aim to replace vdigit with a pure Python
solution, with no C++ component.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list