Markus Neteler wrote:
> .. indeed a nice feature! But would it be nice to have not only:
> ... this part of the script but for the truly lazy also the respective
> grass.run_command() call included?
If you're generating a "front end" for a module, exec_command() may be
more appropriate.
> Something like
>
> coords = options['coordinates']
> grass.run_command('r.profile',
> input = input_map,
> output = output_file,
> profile = coords)
Choosing variable names has a minor complication, in that there are a
couple of option names which are Python keywords (e.g. "from").
If you just want to get rid of the dictionary syntax, the options
could be stored in an object which supports both attribute-style and
key-style access, so you could use either options.coordinates or
options['coordinates'].
--
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev