[GRASSGUI] wxgrass gui status: was [GRASS-dev] Vect_snap_lines (list of lines)

Daniel Calvelo dca.gis at gmail.com
Sat May 12 14:30:55 EDT 2007


On 5/12/07, Glynn Clements <glynn at gclements.plus.com> wrote:
[on dumping tcl's menu structure to python]
> > But sadly, I would be able to cut and past the commands in
> > less time than it would take me to figure out such a script.
>
> Can you give an example of the required Python syntax?

It's in gui_modules/menudata.py and is modelled after gmmenu.tcl. It's
just 4-tuples of strings (label, description, python command called,
grass module), where all four empty means a separator. These are
arranged in a tree (of tuples, but arrays would do) corresponding to
the menu structure, as pairs of ("menu entry",child) with child being
either a 4-tuple of entries or another pair.

The only tricky part is in those commands that require internal work
by tcl (mostly the first menu item); the rest are mainly
correspondences between menu items and grass commands.

I'd do that using a simple protocol (coding the python- ot
tcl-specific parts as special codes) to access a configuration file in
JSON, XML or tab-indented specifications. Not much time to do that
right now, though.

Daniel.

-- 
-- Daniel Calvelo Aros




More information about the grass-gui mailing list