Hi,
I was wandering: does exist a python::core function capable to mogrigy
the inputs of a run_command()?
The mogrify function for psycopg2 is defined as follows:
"/Return a query string after arguments binding. The string returned is
exactly the one that would be sent to the database running the execute()
method or similar./"
>>> cur.mogrify("INSERT INTO test (num, data) VALUES (%s, %s)", (42,
'bar'))
"INSERT INTO test (num, data) VALUES (42, E'bar')"
...so for GRASS it could be:
>>> grass.mogrify_command("r.univar",flags="g",map="test")
"r.univar -g map=test"
This could be helpful in debugging....
Maxi
--
Dr. Eng. Massimiliano Cannata
Responsabile Area Geomatica
Istituto Scienze della Terra
Scuola Universitaria Professionale della Svizzera Italiana
Via Trevano, c.p. 72
CH-6952 Canobbio-Lugano
Tel: +41 (0)58 666 62 14
Fax +41 (0)58 666 62 09
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev