[GRASS-dev] WxPython prototype GRASS GUI. Version 2

Yann Chemin ychemin at gmail.com
Mon Aug 7 21:28:30 EDT 2006


Hello Glynn,

Sorry to ask this new bie question, but you mean that the front-end
should be a file called from the GUI and this front-end will somehow
launch r.mapcalc, don't you?

thanks,
Yann

On 08/08/06, Glynn Clements <glynn at gclements.plus.com> wrote:
>
> Yann Chemin wrote:
>
> > > r.mapcalc doesn't use G_parser(); anything other than "help" or
> > > "--help" will be parsed as an expression.
> >
> > by removing "--interface-description | python grassguy.py" and just
> > calling r.mapcalc, then the terminal from which we launched "python
> > gism.py" gets the r.mapcalc session opened.
> >
> > There must be a way to (at least) make it run from the GUI integrated CLI.
>
> Write a front-end script, e.g.:
>
>         #!/bin/bash
>         #%Module
>         #%  description: r.mapcalc - Raster map layer data calculator
>         #%End
>         #%option
>         #% key: expression
>         #% type: string
>         #% description: mapcalc expression
>         #% required : yes
>         #%end
>
>         if   [ "$1" != "@ARGS_PARSED@" ]
>         then
>                 exec g.parser "$0" "$@"
>         fi
>
>         exec r.mapcalc "$GIS_OPT_EXPRESSION"
>
> Changing r.mapcalc itself to use G_parser() isn't practical.
>
> --
> Glynn Clements <glynn at gclements.plus.com>
>




More information about the grass-dev mailing list