[GRASS-windows] Creating Python scripts that call GRASS functionality from outside

Brian Sanjeewa Rupasinghe jinkabs at gmail.com
Fri Dec 21 11:51:03 PST 2012


I uninstalled GRASS and then re-installed with spearfish data set with its
spearfish60 location and user1 mapset. Still i cannot see .grassrc6 file
created. Any idea? Please not i use Grass for Windows 7.

On Fri, Dec 21, 2012 at 5:21 PM, Brian Sanjeewa Rupasinghe <
jinkabs at gmail.com> wrote:

> Could you explain bit more. You mean without .grasssrc6, it will not work.
> I created a new location and mapset as you instructed. But where to
> find GRASS_DB_ENCODING: ascii in WinGRASS?
>
>
> On Fri, Dec 21, 2012 at 1:30 PM, Glynn Clements <glynn at gclements.plus.com>wrote:
>
>>
>> Brian Sanjeewa Rupasinghe wrote:
>>
>> > I just installed GRASS 6.4.3svn and Python 2.7.3 in Windows 7. I need to
>> > call GRASS functions from outside GRASS. I set the environment variables
>> > given
>> > in the grasswiki except:
>> > GISRC= C:\Documents and settings\user\.grassrc6
>> >
>> > Because i cannot find this .grassrc6 in the given path or in any other
>> > path.
>>
>> A suitable should be created the first time you run GRASS.
>> Alternatively, you can create the file yourself, e.g.:
>>
>> GISDBASE: /opt/grass-data
>> LOCATION_NAME: spearfish57
>> MAPSET: user1
>> GRASS_DB_ENCODING: ascii
>>
>> > However with other variables, i tried to use from grass.lib
>> > importgrass in Python27 IDLE. Then it gives an error. I think the
>> > variables are
>> > not set correctly. Could somebody help me to sort this out?
>>
>> If GISRC doesn't refer to a valid settings file, nothing will work.
>>
>> --
>> Glynn Clements <glynn at gclements.plus.com>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-windows/attachments/20121221/ebf4bd38/attachment.html>


More information about the grass-windows mailing list