Hi list<br>I'm trying to call r.stats grasstools from a python plugin<br>( doing a r.stats -1gn automatically in fact)<br>this python code is based on qgsgrassmodule.cpp, wich is used to launch grasstools in QGIS.<br>I get the grass environment by opening a mapset manually before running the python code.<br>
Then i'm using a QProcess and appending the flag and options.<br>Got NO ERRORS in python console, but the output file isn't created.<br>May be there's a problem with args in the last line ??<br>Is there a python developer in the place ?<br>
<br>--------------------------------------------------------------------------------------------------<br> arg=['C:\Program Files\Quantum GIS\grass\bin\r.stats.exe'];<br> process = QProcess()<br> env = process.systemEnvironment()<br>
env.append("GIS_FLAG_1=1")<br> env.append("GIS_FLAG_G=1")<br> env.append("GIS_FLAG_N=1")<br> env.append("GIS_OPT_INPUT=input=mnt10m")<br> env.append("GIS_OPT_OUTPUT=output=C:\testxyz")<br>
env.append("GIS_OPT_FS=fs=;")<br> arg.append("@ARGS_PARSED@")<br> process.setEnvironment(env)<br> process.start(arg[0],arg)<br>--------------------------------------------------------------------------------------------------<br>
Any Ideas ?<br>Thanks 4 any hints<br><br><span style="font-weight: bold;">PikOBoZ</span><br><br>