Pietro wrote:
> Pygrass is not working properly with r.mapcalc, the problem is how the
> Popen class is used internally, so playing with Popen class:
>
> {{{
> In [1]: import subprocess as sub
>
> In [2]: cmd_list = ['r.mapcalc', 'expression="elev100=elevation*100"', '--o']
This is wrong. The double-quote characters shouldn't be there.
> In [5]: sub.Popen(cmd_shell, shell=True)
Passing a string instead of a list is rarely a good idea. Apart from
anything else, you have to construct the string differently depending
upon whether you're using Unix or Windows (/bin/sh and cmd.exe have
significant differences in their command syntax).
--
Glynn Clements <[email protected]>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev