[GRASS-user] Check if a mapset exists- in Python Script

Hamish hamish_b at yahoo.com
Mon Jan 31 05:14:40 EST 2011

Monica wrote:
> How can I check if a certain mapset exists in my active location in a
> Python Script?

no exact answer, but start with "g.mapsets -l" + .split(' ') +
 import string
 if( string.find(mapsets, 'some_mapset_name') < 0 ):

maybe it helps,


More information about the grass-user mailing list