Hi,<div><br></div><div>Even if the GISRC environmental variable set, i cannot call GRASS libraries from Python 2.7 IDLE.</div><div>For example, when i import grass from grass.lib, it gives the following error in Python IDLE (GUI)</div>
<div><br></div><div>ImportError: No module named grass.lib</div><div><br></div><div>Here is the env.bat file i modified. Newly added lines are below rem #---</div><div><br></div><div><div>set GRASS_WISH=%GISBASE%\extrabin\wish.exe</div>
<div>set GRASS_PYTHON=python</div><div>set GRASS_PROJSHARE=%GISBASE%\proj</div><div>set GRASS_HTML_BROWSER=explorer</div><div>set GRASS_SH=%GISBASE%\msys\bin\sh.exe</div><div><br></div><div>set PYTHONHOME=%GISBASE%\Python27</div>
<div>set GDAL_DATA=%GISBASE%\share\gdal</div><div>set PROJ_LIB=%GISBASE%\proj</div><div>set GEOTIFF_CSV=%GISBASE%\share\epsg_csv</div><div><br></div><div>set PATH=%GISBASE%\msys\bin;%PATH%</div><div>set PATH=%GISBASE%\extrabin;%GISBASE%\extralib;%PATH%</div>
<div>set PATH=%GISBASE%\tcl-tk\bin;%GISBASE%\sqlite\bin;%GISBASE%\gpsbabel;%PATH%</div><div>set PATH=%GISBASE%\bin;%PATH%</div><div><br></div><div>rem #----</div><div><br></div><div>set PATH=%GISBASE%\lib;%PATH%</div><div>
set PATH= %GISBASE%\etc;%PATH%</div><div>set PATH=%GISBASE%\etc\python;%PATH%</div><div>set PATH=C:\Python27;%PATH%</div><div><br></div><div>set GISRC= C:\Users\KABS\AppData\Roaming\GRASS6\grassrc6</div><div>set LD_LIBRARY_PATH = %GISBASE%\lib</div>
<div>set PYTHONLIB= C:\Python27</div><div>set PYTHONPATH= %GISBASE%\etc\python;%PYTHONPATH%</div><div><br></div><br><div class="gmail_quote">On Sat, Dec 22, 2012 at 3:58 PM, Brian Sanjeewa Rupasinghe <span dir="ltr"><<a href="mailto:jinkabs@gmail.com" target="_blank">jinkabs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Many thanks. I got it.<br><br><div class="gmail_quote">On Sat, Dec 22, 2012 at 1:39 PM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com" target="_blank">glynn@gclements.plus.com</a>></span> wrote:<div>
<div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
Brian Sanjeewa Rupasinghe wrote:<br>
.<br>
> Thanks. It is found in C:\Users\<username>\AppData\Roaming. However the<br>
> file name is grassrc6 and not .grassrc6.<br>
> Is it ok?<br>
<br>
</div>Yes.<br>
<br>
It doesn't matter what the file is called, so long as %GISRC% points<br>
to it and it contains the necessary settings.<br>
<span><font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com" target="_blank">glynn@gclements.plus.com</a>><br>
</font></span></blockquote></div></div></div><br>
</blockquote></div><br></div>