<div dir="ltr">Thanks Laurent for your help,<div>it worked to split the string to a list....but now I have to remove the 1 line(group <LE72270902002150EDC00_toar> references the following raster maps), line 2 ('-------------'), the last line ('-------------') and the "<>" around the names... </div><div>I know how to do that.... but is this the best way to deal with outputs of i.group -l in python?</div><div><br></div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-06 11:02 GMT+10:00 Laurent C. <span dir="ltr"><<a href="mailto:lrntct@gmail.com" target="_blank">lrntct@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hello,</p>
<p dir="ltr">Try the .splitlines() method on the string.</p>
<p dir="ltr">Cheers,<br>
Laurent</p>
<div class="gmail_quote"><div><div class="h5">El abr. 5, 2016 19:52, "Leonardo Hardtke" <<a href="mailto:leohardtke@gmail.com" target="_blank">leohardtke@gmail.com</a>> escribió:<br type="attribution"></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear list members,<div>I know this is more a python question than a GRASS question, bot for sure some of you knows the ansewer and is able to help me....<br clear="all"><div><br></div><div>I need to get a python list with the maps from a group, like ["map1","map2","map"]</div><div><br></div><div>But by using gscript.read_command.... i get string, not a list.</div><div><br></div><div><div>gscript.read_command("i.group", group=groupname, flags="l" )</div><div>'group <LE72270902002150EDC00_toar> references the following raster maps\n-------------\n<LE72270902002150EDC00_toar.1@landsat>    \n<LE72270902002150EDC00_toar.2@landsat>    \n<LE72270902002150EDC00_toar.3@landsat>    \n<LE72270902002150EDC00_toar.4@landsat>    \n<LE72270902002150EDC00_toar.5@landsat>    \n<LE72270902002150EDC00_toar.7@landsat>    \n-------------\n'</div></div><div><br></div><div>Your help is appreciated! </div><div>Leo</div>-- <br><div><div dir="ltr">Dr. Leonardo A. Hardtke   <br>Laboratorio de Teledetección y S.I.G.  <br>Centro Nacional Patagónico (CONICET) <br>Bvd. Brown 2825, 9120 <br>Puerto Madryn, Chubut, Argentina </div></div>
</div></div>
<br></div></div>_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/grass-user</a><br></blockquote></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Dr. Leonardo A. Hardtke   <br>Laboratorio de Teledetección y S.I.G.  <br>Centro Nacional Patagónico (CONICET) <br>Bvd. Brown 2825, 9120 <br>Puerto Madryn, Chubut, Argentina </div></div>
</div>