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

2011-02-01 Thread Monica Buescu
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

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

2011-02-01 Thread Martin Landa
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?

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

2011-01-31 Thread Monica Buescu
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

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

2011-01-31 Thread Hamish
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

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

2011-01-31 Thread Glynn Clements
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 ___