Glynn Clements wrote
> Helmut Kudrnovsky wrote:
> 
>> to answer my own question, new lines are not recognized correctly in the
>> expression,
> 
> I should have read your follow-up before sending my reply.
> 
> But, for future reference, can you test the other two options (using
> CR+LF, and using write_command())?
> 
> -- 
> Glynn Clements <

> [email protected]

> >
> _______________________________________________
> grass-dev mailing list

> [email protected]

> http://lists.osgeo.org/mailman/listinfo/grass-dev


> Can you try replacing the grass.mapcalc() call with:
>       grass.write_command('r.mapcalc', file = '-', stdin = expr)

grass.write_command('r.mapcalc', file = '-', stdin = expr)
0

=> calculation done

>Or maybe it requires CR+LF on Windows:
>       expr = "calc4 = (100.0 / 48.0) * \\\r\n(%s)" % " + \\\r\n".join(terms)
>       grass.mapcalc(expr)

=> wxpython GUI crash



-----
best regards
Helmut
--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/grass7-python-script-moving-window-how-to-simplify-accelerate-r-mapcalc-tp5143161p5143452.html
Sent from the Grass - Dev mailing list archive at Nabble.com.
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to