[GRASS-user] Adding options to grass.run_command

Hanlie Pretorius hanlie.pretorius at gmail.com
Fri Sep 3 11:52:19 EDT 2010


Hi,

I'm writing my first GRASS Python script and am having trouble adding
options to commands  that I want to run. For example, the following
works:
-----
grass.run_command("r.in.xyz", input=directory+'/'+file,
output=rainraster, fs=',', x=2, y=1)
-----

but this doesn't:
-----
grass.run_command("r.in.xyz", --overwrite, input=directory+'/'+file,
output=rainraster, fs=',', x=2, y=1)
-----

neither does this:
-----
grass.run_command("r.in.xyz --overwrite", input=directory+'/'+file,
output=rainraster, fs=',', x=2, y=1)
-----

How can I get this to work, or is there a better way of doing it using
a command other than grass.run_command?

Thanks
Hanlie


More information about the grass-user mailing list