António Rocha wrote:
I need to find, in a certain mapset, a list of files with a name that
match a certain string and count them. How can I do this? I'm
implementing this in a Py Script
grass.script.mlist() provides an interface to g.mlist, although it
only supports glob patterns and not regexps. If you need regexps:
def mlist(type, pattern = None, mapset = None):
result = list()
for line in read_command(g.mlist,
flags = 'r',
type = type,
pattern = pattern,
mapset = mapset).splitlines():
result.append(line.strip())
return result
--
Glynn Clements gl...@gclements.plus.com
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user