Thanks Glynn. Regarding the split function, is is part of GRASS pythin Scripting Library or from normal Python library?<div>And how can I access an item from the rastermaps list? using rastermaps[0] and rastermaps[1]?</div>
<div><br>Thank you<br><br><div class="gmail_quote">On Wed, Feb 17, 2010 at 7:12 PM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
Luis Lisboa wrote:<br>
<br>
> I'm working on 6.4.0 version and I want to build a Python scripts that acess<br>
> multiple files. From GRASS7 i.spectral I see that raster variable is a<br>
> multiple and this is performed.<br>
> raster = options['raster']<br>
> rastermaps = raster.split(',')<br>
><br>
> My question is regarding this: how can I access second file for, for<br>
> instance, do a mapcalc or a for cycle?<br>
<br>
</div></div>The .split() method returns a list, so in the above case you can use<br>
e.g.:<br>
<br>
for map in rastermaps:<br>
...<br>
<font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</font></blockquote></div><br></div>