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">&lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;</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>
&gt; I&#39;m working on 6.4.0 version and I want to build a Python scripts that acess<br>
&gt; multiple files. From GRASS7 i.spectral I see that raster variable is a<br>
&gt; multiple and this is performed.<br>
&gt; raster = options[&#39;raster&#39;]<br>
&gt; rastermaps = raster.split(&#39;,&#39;)<br>
&gt;<br>
&gt; My question is regarding this: how can I access second file for, for<br>
&gt; 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 &lt;<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>&gt;<br>
</font></blockquote></div><br></div>