[GRASS-user] Output parsing in python

thedok78 thedoktor78 at gmail.com
Wed Apr 7 08:16:23 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/Output-parsing-in-python-tp4864508p4864508.html
Sent from the Grass - Users mailing list archive at Nabble.com.


More information about the grass-user mailing list