[GRASS-user] Use of g.mlist inside r.series

Brian Sanjeewa Rupasinghe jinkabs at gmail.com
Thu Jan 10 05:32:10 PST 2013


Many Thanks Martin. It worked fine.

Cheers, Brian

On Thu, Jan 10, 2013 at 6:55 PM, Martin Landa <landa.martin at gmail.com>wrote:

> Hi,
>
> 2013/1/10 Brian Sanjeewa Rupasinghe <jinkabs at gmail.com>:
> > grass.run_command ("r.series", input="`g.mlist pattern = 'viewshed*' sep
> =,
> > `", output = 'xx', method = 'sum')
>
> you cannot use bash-like constructions in Python script. Try
>
> maps = grass.mlist_strings(type = 'rast', pattern = 'viewshed*')
> grass.run_command ("r.series", input = maps, output = 'xx', method = 'sum')
>
> Martin
>
> --
> Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20130110/b7aed85f/attachment.html>


More information about the grass-user mailing list