[GRASS-user] loop import+merge
glynn at gclements.plus.com
Tue Dec 14 18:04:07 EST 2010
> Thanks. That was what I was searching for so urgent!
> This one works even it might not be the nicest one:
A quick note on style:
> while n<5:
The main looping idiom in Python is "for ... in ...", e.g.:
for n in xrange(1, 5):
i = str(n)
flags="-o" isn't valid; it happens to work due to an implementation
detail, but that could change, and won't work if you need to use any
other flags. If you want to enable the --overwrite flag, use:
> 'v.patch', overwrite=True,
Similarly for --quiet and --verbose.
For now, the best references for the GRASS-Python scripting library
are its source code and the existing scripts in 7.0.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user