[GRASS-user] Re: CYGWIN

Luigi Ponti lponti at infinito.it
Tue Dec 15 13:37:28 EST 2009


On 14/12/2009 18:17, Glynn Clements wrote:
> Luigi Ponti wrote:
>
>   
>>>> But when I do /db.test test1/ errors arise:
>>>>     
>>>>         
>>>   
>>> [...]
>>>
>>> My guess is that this is a problem with Cygwin and Windows 7.
>>>   
>>>       
>> I have eventually reverted back to GRASS 6.3.0 for now, after fixing 
>> some missing dll's. I am not sure what is wrong with 6.4 vs 6.3 but I 
>> need a functional GRASS/Cygwin version to run some bash scripts while I 
>> port them to Phython.
>>     
>
> I wouldn't consider the supplied db.test test case failing to equate
> to "non-functional"; it's the test case which is wrong, not db.select.
>   
You are right: I used the wrong words -- thanks for the explanation. I 
will keep trying to get 6.4.0-RC5 compiled on Cygwin/Windows 7. Thanks 
again for sharing your configure options.

> [...]
>
> If you care about the exact format of floating-point values output
> from db.select, note that future versions will behave like 6.4.0-RC5,
> not like 6.3.x.
>   
Good to know, thanks.
>> Also, is it even possible to do Python scripting in the native Windows 
>> GRASS 6.4.x?
>>     
>
> Yes.
>
>   
>> For example, I noticed that some of the GRASS scripts that 
>> have been translated to Python require a grass.py package, which I don't 
>> see in my osgeo4w installation.
>>     
>
> There is no grass.py. It existed for a brief time, but the "grass"
> module was replaced with a "grass" package containing multiple
> modules, then later split into two subpackages, "script" and "lib".
>   
The package is described in the programming manual -- I should have 
explored better:
http://download.osgeo.org/grass/grass6_progman/pythonlib.html

The progman page above says that the code is in lib/python/ while in my 
osgeo4w GRASS 6.4.0svn r36506
http://trac.osgeo.org/osgeo4w/wiki/pkg-grass

the code seems to reside into etc/python.
> The change was made to accomodate the SWIG bindings for the GRASS
> libraries in the "grass.lib" package, so the scripting functions were
> moved from "grass" to "grass.script".
>   
Would the lib subpackage you mentioned be any useful in developing GRASS 
scripts? (I could not find it in my osgeo4w installation.)
Thanks and regards,
Luigi
> Some early scripts use "import grass", but for current versions
> (including 6.4.0-RC5), you need e.g. "import grass.script as grass".
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20091215/0fa7ceee/attachment.html


More information about the grass-user mailing list