[GRASS-user] Problem with Python Scripts and grass.script (GRASS 6.5SVN) on Mac

Johannes Radinger JRadinger at gmx.at
Sun Apr 3 15:23:42 EDT 2011


Hello Glynn,
Hello Michael,

the answers to your suggestions/questions below:


Am 02.04.2011 um 17:24 schrieb Michael Barton:

> Have you installed Python from python.org on your Mac? If you have, there may be a problem with that.

Yes I there is python2.6.6 from python.org installed but William Kyngesburye told me that this shouldn't be any
Problem and GRASS GIS can handle this, but I am not sure. Maybe I've to try to deinstall it, but I don't know how excatly so that everything is removed correctly also in the libs.


> 
> Michael
> ____________________
> C. Michael Barton
> Director, Center for Social Dynamics & Complexity 
> Professor of Anthropology, School of Human Evolution & Social Change
> Arizona State University
> 
> voice: 	480-965-6262 (SHESC), 480-727-9746 (CSDC)
> fax:          480-965-7671 (SHESC),  480-727-0709 (CSDC)
> www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.ed

Am 03.04.2011 um 00:37 schrieb Glynn Clements:
> 
> Johannes Radinger wrote:
> 
>> I tried to figure out the problem with william kyngesburye.
>> the script is also working on his mac. I saved the script in the bin
>> folder and ran in the GRASS terminal:
> 
>> AttributeError: 'module' object has no attribute 'mapcalc'
>> 
>> 
>> What causes this AttributeError?
> 
> The grass.script module is either broken or very old (the mapcalc()
The GRASS build I've got is compiled from last weeks source (6.5)...

> function was added in December 2008).
> 
> From within GRASS, try the following:
> 
> 	$ python
> 	> import grass.script as grass
> 	> print grass.__file__
that is what I get... does that help you?

/Applications/GRASS-6.5.app/Contents/MacOS/etc/python/grass/script/__init__.pyc

> 	> print grass.__path__
and for the path:
['/Applications/GRASS-6.5.app/Contents/MacOS/etc/python/grass/script']


/johannes


> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110403/577be887/attachment.html


More information about the grass-user mailing list