[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-user
Subject:    Re: [GRASS-user] Get output from r.stats in Python script
From:       Moritz Lennert <mlennert () club ! worldonline ! be>
Date:       2013-07-29 14:21:35
Message-ID: 51F67A6F.7060006 () club ! worldonline ! be
[Download RAW message or body]

On 29/07/13 15:03, António Rocha wrote:
> Dear all
> I'm doing some Python scripts and I want to retrieve r.stats output
> information in a variable. How can I do this?
> variable= grass.run_command("r.series", ...... )


Try grass.pipe_command as suggested here: 
http://grasswiki.osgeo.org/wiki/GRASS_Python_Scripting_Library#Example_for_parsing_category_numbers

or possibly grass.read_command.

Moritz
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic