[GRASS-dev] Re: grass-dev Digest, Vol 68, Issue 41

Glynn Clements glynn at gclements.plus.com
Thu Oct 27 23:43:23 EDT 2011


Michael Barton wrote:

> In the second statement, I think the format should be...
> 
> 
> grass.mapcalc("'%s_nothin' = '%s_nothin' * '%s'" % (r_stream, r,stream, r_mask))
> 
> Using the "$" does not work on my system at least. 

grass.mapcalc() substitutes the arguments into the expression using
string.Template.substitute():

http://docs.python.org/library/string.html#template-strings

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list