[GRASS-windows] msys grass63 and wingrass
gnelson at uiuc.edu
Sat Feb 9 15:12:15 EST 2008
I can't help you with the python, but I run grass from within an msys window
by doing the following
1. launch msys
2. in the window that opens, type "cd /c/grassxxx/bin" . Replace grassxxx
with whatever your grass directory is called.
3. type "grass63". This should run the grass63 (that's the version I'm
using) of wingrass, launch a gui, and leave the msys window open.
Within the msys window you can now type grass commands, or you can put them
into a text file and execute the resulting file. Or use most bash type
commands as well.
From: Nicolas B. [mailto:piklas at gmail.com]
Sent: Saturday, February 09, 2008 1:11 PM
To: Gerald Nelson
Subject: Re: [GRASS-windows] msys grass63 and wingrass
Hello Mr Nelson and list
Your post is very interesting and deals perfectly with what i'm going on
regarding QGIS / Grass python development. In fact, i'm trying to use the
grasstools from a QGIS plugin written in python for a windows plateform.
This plugin calls an external program that needs some elevation raster
values for calculation. I can get thoses values manually using the r.out.xyz
or the r.stats -1gn commands in the grass shell (that runs trough msys with
rxvt.exe), but my goal is to do the extraction automatically with the python
So I first tryed to reproduce the QgsGrassModule.cpp code into python by
setting the grass gisenv and using a QProcess, but with no success. (no
python errors but no sucess with xyz file creation !)
I then tried to call the msys grass shell and to pass a grass command as
argument. The rxvt.exe is launched but i don't know how to pass commands to
it. May be i can write my simple grass command into a .bat or .sh file and
open it with the shell as a script file. As i'm quiet newbie with grass, i
don't know how to launch a script on windows with msys. Is any one can help
me with this ? Is a script can simply contains only a grass command ?
If any advanced grass user know python and read this post, Please help !
If it works, the grasstools will be callable in QGIS using python bindings,
so quiet easily!!
Thanks for any hints !!!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-windows