<div dir="ltr"><div><div><div>Hi,<br></div>       I have been trying to use GRASS without opening it explicitly following the instructions from here:  <a href="http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Python:_GRASS_GIS_6">http://grasswiki.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly#Python:_GRASS_GIS_6</a><br><br></div>      Since I am on Windows, I had to adapt it a bit (and I tried many, many variations).  The most likely <br><br><br>import os<br>import sys<br>location = "AZ"<br>mapset   = "AZMAP"<br>gisbase = os.environ['GISBASE'] = "C:/Program Files/QGIS Valmiera/apps/grass/grass-6.4.3"<br>sys.path.append(os.path.join(os.environ['GISBASE'], "etc", "python"))<br>gisdbase = os.path.join(os.getenv('APPDATA', 'GRASS6/grassrc6'))<br>import grass.script as grass<br>import grass.script.setup as gsetup<br>gsetup.init(gisbase, gisdbase, location, mapset)<br><br><br></div>What I get when I run these lines is the line below:<br><div><div><br>'c:\\users\\pcamargo\\appdata\\local\\temp\\tmp7wvogg'<br><br><br></div><div>The content of this file is <br></div><div><br>GISDBASE: C:/Users/pcamargo/AppData/Roaming/GRASS6/grassrc6<br>LOCATION_NAME: AZ<br>MAPSET: AZMAP<br><br></div><div>While it should be getting the contents from the file at C:\Users\pcamargo\AppData\Roaming\GRASS6\grassrc6<br><br><br></div><div>What am I doing wrong?<br><br></div><div>Thanks,<br><br></div><div>Pedro<br></div><div><br><br></div></div></div>