Hi Glynn
I tried grass.script.mapsets but I get this error:
line 59, in main
var=grass.mapsets(False)
AttributeError: 'module' object has no attribute 'mapsets'
previously I had this: import grass.script as grass
Am I doing something wrong?
Thank you Glynn
Monica
On Mon, Jan 31, 2011 at
Hi,
2011/2/1 Monica Buescu monicabuescu1...@gmail.com:
I tried grass.script.mapsets but I get this error:
line 59, in main
var=grass.mapsets(False)
AttributeError: 'module' object has no attribute 'mapsets'
previously I had this: import grass.script as grass
Am I doing something wrong?
Greetings
How can I check if a certain mapset exists in my active location in a Python
Script?
Thanks
Monica
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
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,
Hamish
Monica Buescu wrote:
How can I check if a certain mapset exists in my active location in a Python
Script?
grass.script.mapsets(False)
returns a list of mapsets in the current location.
--
Glynn Clements gl...@gclements.plus.com
___