[GRASS-dev] Use 'from=' parameter in python script

Vaclav Petras wenzeslaus at gmail.com
Wed Mar 21 18:14:12 PDT 2018


On Wed, Mar 21, 2018 at 7:57 PM, Nikos Alexandris <nik at nikosalexandris.net>
wrote:
>
> how can I use the 'from' parameter in a python script? The following
> ```
> from_range=0,255
> to_range=0,511
> cls.runModule('r.rescale', input=band, output=output_map_name,
>                        from=from_range, to=to_range, overwrite=True)
> ```
>
> causes expectedly
> ```
> SyntaxError: invalid syntax
> ```


Try `from_`. I'm not sure at this point if it works in a gunittest (which
you seem to be using).

Vaclav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20180321/efe5204d/attachment.html>


More information about the grass-dev mailing list