<div>Dear all,</div>
<div> </div>
<div>I am trying to play with grass &amp; python, and I am trying to</div>
<div>reproduce the first example available at </div>
<div><a href="http://grass.osgeo.org/wiki/GRASS_and_Python">http://grass.osgeo.org/wiki/GRASS_and_Python</a></div>
<div>with the following adaptation:</div>
<div>----------------------</div>
<div>#!/usr/bin/env python<br>import sys<br>import grass<br> <br>def main():<br>     drape_map = options[&#39;MQ_simulation_050001_p023_h007&#39;]<br>     relief_map = options[&#39;MQ_simulation_050010_p010_h013&#39;]<br>
     brighten = options[&#39;brighten&#39;]<br>     ret = grass.run_command(&quot;d.his&quot;, h_map = drapemap,  i_map = relief_map, brighten = brighten)<br>     return 0<br> <br>if __name__ == &quot;__main__&quot;:<br>     options, flags = grass.parser()<br>
     sys.exit(main())</div>
<div>-----------</div>
<div> </div>
<div> </div>
<div>To try this I started MSYS, started GRASS with -gui option,</div>
<div>and then typed the name of the script (python_grass03.py): The error looks like:</div>
<div>----............................</div>
<div>GRASS 6.4.0RC4 (SDB_PL_teste):/c/Data/Paisagens_Simuladas/teste_python &gt;  python_grass03.py<br>Traceback (most recent call last):<br>  File &quot;./python_grass03.py&quot;, line 13, in &lt;module&gt;<br>    options, flags = grass.parser()<br>
  File &quot;C:\OSGeo4W\apps\grass\grass-6.4.0RC4\etc\python\grass.py&quot;, line 208, in parser<br>    os.execvp(&quot;g.parser&quot;, [name] + argv)<br>  File &quot;c:\Python25\lib\os.py&quot;, line 354, in execvp<br>    _execvpe(file, args)<br>
  File &quot;c:\Python25\lib\os.py&quot;, line 390, in _execvpe<br>    func(fullname, *argrest)<br>OSError: [Errno 2] No such file or directory<br>----............................</div>
<div> </div>
<div> </div>
<div> </div>
<div>The environment of my grass session looks like</div>
<div>-------------------++++++++++++++++++++</div>
<div>GRASS 6.4.0RC4 (SDB_PL_teste):/c/Data/Paisagens_Simuladas/teste_python &gt; set<br>!::=&#39;::\&#39;<br>!C:=&#39;C:\&#39;<br>ALLUSERSPROFILE=&#39;C:\ProgramData&#39;<br>APPDATA=&#39;C:\Users\famiglia\AppData\Roaming&#39;<br>
ARCGISHOME=&#39;C:\Program Files (x86)\ArcGIS\&#39;<br>BASH=/bin/sh<br>BASH_VERSINFO=([0]=&quot;2&quot; [1]=&quot;04&quot; [2]=&quot;0&quot; [3]=&quot;1&quot; [4]=&quot;release&quot; [5]=&quot;i686-pc-msys&quot;)<br>BASH_VERSION=&#39;2.04.0(1)-release&#39;<br>
BGCOLOR=LightYellow<br>COLORFGBG=&#39;default;default&#39;<br>COLORTERM=rxvt<br>COLUMNS=97<br>COMMONPROGRAMFILES=&#39;C:\Program Files (x86)\Common Files&#39;<br>COMMONPROGRAMFILES(X86)=&#39;C:\Program Files (x86)\Common Files&#39;<br>
COMMONPROGRAMW6432=&#39;C:\Program Files\Common Files&#39;<br>COMPUTERNAME=FAMIGLIA-PC<br>COMSPEC=&#39;C:\Windows\SysWOW64\cmd.exe&#39;<br>DFSTRACINGON=FALSE<br>DIRSTACK=()<br>DISPLAY=:0<br>EUID=500<br>FGCOLOR=Navy<br>FP_NO_HOST_CHECK=NO<br>
GDAL_DATA=&#39;C:\OSGeo4W\share\gdal&#39;<br>GEOTIFF_CSV=&#39;C:\OSGeo4W\share\epsg_csv&#39;<br>GISBASE=/c/OSGeo4W/apps/grass/grass-6.4.0RC4<br>GISRC=/tmp/grass6-famiglia-6244/gisrc<br>GIS_LOCK=6244<br>GRASS_GNUPLOT=&#39;gnuplot -persist&#39;<br>
GRASS_HTML_BROWSER=&#39;C:\Program Files (x86)\Internet Exporer\iexplore&#39;<br>GRASS_LD_LIBRARY_PATH=&#39;/c/OSGeo4W/apps/grass/grass-6.4.0RC4/lib:/c/OSGeo4W/bin:/c/OSGeo4W/apps/grass/grass-6.4.0RC4/bin:/c/OSGeo4W/apps/grass/grass-6.4.0RC4/scripts:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/osgeo4w/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/c/Python26:/c/gdalwin32-1.6/bin:/c/msys/1.0:/c/msys/1.0/bin:/c/Program Files (x86)/Java/jre6/bin:/bin:/bin&#39;<br>
GRASS_PAGER=less<br>GRASS_PERL=no<br>GRASS_PROJSHARE=&#39;C:\OSGeo4W\share\proj&#39;<br>GRASS_PYTHON=python<br>GRASS_SH=/bin/sh<br>GRASS_TCLSH=tclsh<br>GRASS_VERSION=6.4.0RC4<br>GRASS_WISH=/c/OSGeo4W/bin/wish.exe<br>GROUPS=()<br>
HISTFILE=/c/Users/famiglia/.bash_history<br>HISTFILESIZE=500<br>HISTSIZE=500<br>HOME=/c/Users/famiglia<br>HOMEDRIVE=C:<br>HOMEPATH=&#39;\&#39;<br>HOSTNAME=FAMIGLIA-PC<br>HOSTTYPE=i686<br>IFS=&#39;   <br>&#39;<br>LINES=45<br>
LOCALAPPDATA=&#39;C:\Users\famiglia\AppData\Local&#39;<br>LOGNAME=famiglia<br>LOGONSERVER=&#39;\\FAMIGLIA-PC&#39;<br>MACHTYPE=i686-pc-msys<br>MAILCHECK=60<br>MAKE_MODE=unix<br>MINGW32BGCOLOR=LightYellow<br>MINGW32FGCOLOR=Navy<br>
MSYSBGCOLOR=White<br>MSYSCON=rxvt.exe<br>MSYSFGCOLOR=Black<br>MSYSTEM=MINGW32<br>NUMBER_OF_PROCESSORS=4<br>OLDPWD=/usr/bin<br>OPTERR=1<br>OPTIND=1<br>OS=Windows_NT<br>OSGEO4W_ROOT=&#39;C:\OSGeo4W&#39;<br>OSTYPE=msys<br>PATH=&#39;/c/OSGeo4W/apps/grass/grass-6.4.0RC4/lib:/c/OSGeo4W/bin:/c/OSGeo4W/apps/grass/grass-6.4.0RC4/bin:/c/OSGeo4W/apps/grass/grass-6.4.0RC4/scripts:.:/usr/local/bin:/mingw/bin:/bin:/osgeo4w/bin:/osgeo4w/bin:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/c/Python26:/c/gdalwin32-1.6/bin:/c/msys/1.0:/c/msys/1.0/bin:/c/Program Files (x86)/Java/jre6/bin:/bin:/bin&#39;<br>
PATHEXT=&#39;.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC&#39;<br>PIPESTATUS=([0]=&quot;1&quot;)<br>PPID=6244<br>PROCESSOR_ARCHITECTURE=x86<br>PROCESSOR_ARCHITEW6432=AMD64<br>PROCESSOR_IDENTIFIER=&#39;Intel64 Family 6 Model 23 Stepping 10, GenuineIntel&#39;<br>
PROCESSOR_LEVEL=6<br>PROCESSOR_REVISION=170a<br>PROGRAMDATA=&#39;C:\ProgramData&#39;<br>PROGRAMFILES=&#39;C:\Program Files (x86)&#39;<br>PROGRAMFILES(X86)=&#39;C:\Program Files (x86)&#39;<br>PROGRAMW6432=&#39;C:\Program Files&#39;<br>
PROJ_LIB=&#39;C:\OSGeo4W\share\proj&#39;<br>PROMPT=&#39;$P$G&#39;<br>PS1=&#39;GRASS 6.4.0RC4 (SDB_PL_teste):\w &gt; &#39;<br>PS2=&#39;&gt; &#39;<br>PS4=&#39;+ &#39;<br>PUBLIC=&#39;C:\Users\Public&#39;<br>PWD=/c/Data/Paisagens_Simuladas/teste_python<br>
PYTHONHOME=/c/OSGeo4W/apps/grass/grass-6.4.0RC4/etc/python:/c/Python25<br>PYTHONPATH=&#39;/c/OSGeo4W/apps/grass/grass-6.4.0RC4/etc/python:/c/Python25:C:\Python25\;C:\Program Files (x86)\ArcGIS\bin;C:\OSGeo4W\apps\grass\grass-6.4.0RC4\etc\python&#39;<br>
SESSIONNAME=Console<br>SHELL=/bin/sh<br>SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs<br>SHLVL=4<br>SYSTEMDRIVE=C:<br>SYSTEMROOT=&#39;C:\Windows&#39;<br>TEMP=/tmp<br>TERM=msys<br>TMP=/tmp<br>
TRACE_FORMAT_SEARCH_PATH=&#39;\\<a href="http://NTREL202.ntdev.corp.microsoft.com">NTREL202.ntdev.corp.microsoft.com</a>\34FB5F65-FFEB-4B61-BF0E-A6A76C450FAA\TraceFormat&#39;<br>UID=500<br>USERDOMAIN=famiglia-PC<br>USERNAME=famiglia<br>
USERPROFILE=&#39;C:\Users\famiglia&#39;<br>WD=&#39;C:\OSGeo4W\apps\msys\\bin\&#39;<br>WINDIR=&#39;C:\Windows&#39;<br>WINDOWID=167838960<br>_=python_grass03.py</div>
<div>-------------------++++++++++++++++++++</div>
<div> </div>
<div>I am running GRASS 6.4R4 under MSYS and VISTA.</div>
<div> </div>
<div>Any hint are welcome.</div>
<div> </div>
<div>bests</div>
<div>milton</div>
<div> </div>