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

Martin Landa landa.martin at gmail.com
Thu Jan 10 05:25:02 PST 2013


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


More information about the grass-user mailing list