<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I can&#8217;t help you with the python,
but I run grass from within an msys window by doing the following<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>1. launch msys<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>2. in the window that opens, type &#8220;cd
/c/grassxxx/bin&#8221; . Replace grassxxx with whatever your grass directory is
called.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>3. type &#8220;grass63&#8221;. This should
run the grass63 (that&#8217;s the version I&#8217;m using) of wingrass, launch
a gui, and leave the msys window open.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>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.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Regards,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Jerry<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Nicolas B.
[mailto:piklas@gmail.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Saturday, February 09, 2008
1:11 PM<br>
<b><span style='font-weight:bold'>To:</span></b> Gerald Nelson<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [GRASS-windows] msys
grass63 and wingrass</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Hello Mr Nelson and list<br>
<br>
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. <br>
<br>
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 code.<br>
<br>
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 !)<br>
<br>
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 ?<br>
<br>
If any advanced grass user know python and read this post, Please help !<br>
If it works, the grasstools will be callable in QGIS using python bindings, so
quiet easily!!<br>
<br>
Thanks for any hints !!!<br>
<br>
PikObOZ<o:p></o:p></span></font></p>

</div>

</body>

</html>