Re: [GRASS-user] Adding options to grass.run_command

2010-09-03 Thread Glynn Clements

Martin Landa wrote:

> > 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)
> 
> should be `overwrite = True` instead `--overwrite`

Likewise for "quiet" and "verbose".

Any normal (single-dash) flags must specified via "flags=...", e.g.:

r.something -a -b -c ...

becomes:

grass.run_command("r.something", flags="abc", ...)

-- 
Glynn Clements 
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Adding options to grass.run_command

2010-09-03 Thread Hanlie Pretorius
Thanks :-)

2010/9/3, Martin Landa :
> 2010/9/3 Hanlie Pretorius :
>> grass.run_command("r.in.xyz", input=directory+'/'+file,
>> output=rainraster, fs=',', x=2, y=1)
>
> better `input = os.path.join(directory, file)`
>
>> 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)
>
> should be `overwrite = True` instead `--overwrite`
>
> Martin
>
> --
> Martin Landa  * http://gama.fsv.cvut.cz/~landa
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Adding options to grass.run_command

2010-09-03 Thread Martin Landa
2010/9/3 Hanlie Pretorius :
> grass.run_command("r.in.xyz", input=directory+'/'+file,
> output=rainraster, fs=',', x=2, y=1)

better `input = os.path.join(directory, file)`

> 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)

should be `overwrite = True` instead `--overwrite`

Martin

-- 
Martin Landa  * http://gama.fsv.cvut.cz/~landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user