[GRASS-user] Parsing output with python

thedok78 thedoktor78 at gmail.com
Wed Apr 7 06:40:36 EDT 2010


Hello everybody,
I am porting a bash script to python and for it I need to know the number of
cells of a certain category. Right now I use this syntax:
grass.parse_command('r.stats',flags='c',input='map'), but the output is
something like this: {'112 525': None.. }.
Is there a way to have {'112':525..} so that I can easy get the number of
cells ?

Thank you very much
Luca
-- 
View this message in context: http://n2.nabble.com/Parsing-output-with-python-tp4864105p4864105.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list