Hello,

Try the .splitlines() method on the string.

Cheers,
Laurent
El abr. 5, 2016 19:52, "Leonardo Hardtke" <[email protected]> escribió:

> Dear list members,
> 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....
>
> I need to get a python list with the maps from a group, like
> ["map1","map2","map"]
>
> But by using gscript.read_command.... i get string, not a list.
>
> gscript.read_command("i.group", group=groupname, flags="l" )
> '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'
>
> Your help is appreciated!
> Leo
> --
> Dr. Leonardo A. Hardtke
> Laboratorio de Teledetección y S.I.G.
> Centro Nacional Patagónico (CONICET)
> Bvd. Brown 2825, 9120
> Puerto Madryn, Chubut, Argentina
>
> _______________________________________________
> grass-user mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to