[GRASS-dev] Re: [GRASS-user] v.out.ogr multiple

Glynn Clements glynn at gclements.plus.com
Sat Jul 12 18:41:38 EDT 2008


Moritz Lennert wrote:

> >> Moving this over to grass-dev: is there a gisprompt for directories 
> >> instead of files ?
> > 
> > No.
> 
> Wouldn't it make sense to include one ?

Quite possibly.

> How hard is this ?

AFAICT, you would need to add support in three places: gis_prompt()
(for terminal interaction), the Tcl/Tk GUI (lib/gis/gui.tcl), and the
wxPython GUI.

> >> Also, where can one see all the defined gisprompts for g.parser ?
> > 
> > gis_prompt() in lib/gis/parser.c.
> > 
> > However, that list isn't guaranteed to be exhaustive.
> 
> Could you elaborate on this ? ;-)
> 
> When writing a script, how can one know which options are available ?

You can use any string you wish as the gisprompt value. Mostly,
G_parser() just passes that string along without interpreting it. If
the gisprompt string is not given or isn't recognised, the UI will
just expect the user to enter a string. Recognised values will result in a
more specific interaction; e.g. the terminal interaction may allow you
to obtain a list of valid answers by typing "list", the GUIs may
display a list of choices, etc.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list