[GRASS-user] Get output from r.stats in Python script

Moritz Lennert mlennert at club.worldonline.be
Mon Jul 29 07:21:35 PDT 2013


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


More information about the grass-user mailing list