[GRASS-user] Python scripting: Proper use of run_command / start_command
"Peter Löwe"
peter.loewe at gmx.de
Sat Jun 16 15:32:06 PDT 2012
Hi all,
I am struggling with the proper use of start_command/run_command for Python scripting.
The programmers manual provides this simple example:
p = grass.start_command("g.gisenv", stdout = subprocess.PIPE)
What is the proper way to include keyword-arguments tuples ?
For example, "g.list -f type=rast,vect" should translate into something like:
grass.run_command("g.list","f",dict(type="rast,vect"))
^- this invocation of the run_command fails:
ERROR: Required parameter <type> not set:
(Data type)
Any advice on how to get this right would be much appreciated.
Peter
--
Dr. Peter Löwe
<peter.loewe at gmx.de>
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
More information about the grass-user
mailing list