[GRASS-user] Syntax error (v.distance in Python)

Martin Landa landa.martin at gmail.com
Mon Mar 15 16:50:41 EDT 2010


2010/3/15 Glynn Clements <glynn at gclements.plus.com>:
> It is. "from" is a Python keyword (used for "from module import ...").
>> but I couldn't figure out how to solve it. So, it would be great if
>> someone could help me out.
> Add a leading underscore, i.e.:
>        grass.run_command("v.distance", flags='a', _from=fromLayer, ...
> make_command (and thus everything which uses it: run_command,
> start_command, etc) automatically removes a leading underscore from
> any option names, in order to deal with exactly this situation (see
> scripts/v.what.vect/v.what.vect.py).

is there no way how to ignore such keyword here without adding
underscore. It's quite tricky approach.


Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

More information about the grass-user mailing list