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

Michael Barton Michael.Barton at asu.edu
Tue Mar 29 10:40:28 EDT 2011


Hi Johannes,

Sorry I couldn't get back to you sooner. But it seems like others have told you about the line ending issue. That's a real problem because most people (myself included) will want to start out by copying an example program from the GRASS site. 

...and it will utterly fail to run.

Anyway, now that your got it started, it is a debugging issue. Put in some debugging code like...

print 'my program gets this far'

...at different places to see where it is getting stuck. This is tedious but always seems needed.

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.edu





On Mar 29, 2011, at 3:25 AM, <grass-user-request at lists.osgeo.org> wrote:

> Date: Tue, 29 Mar 2011 11:11:12 +0200
> From: "Johannes Radinger" <JRadinger at gmx.at>
> Subject: [GRASS-user] Problem with Python Scripts and grass.script
> 	(GRASS	6.5SVN) on Mac
> To: grass-user at lists.osgeo.org
> Message-ID: <20110329091112.282590 at gmx.net>
> Content-Type: text/plain; charset="utf-8"
> 
> Hello Grass users!
> 
> I am working with GRASS 6.5 SVN (r45714, last weeks source) and try to run Python Scripts. After I solved the problem with the line endings, GRASS seems to be able to read my scripts (via launch script...). At least the interactive interface pops up correctly (it seems g.parser can read all my options etc.), but after executing it nothing happens and nothing is processed. I tried it with mapcalc but also with r.thin (one input, one output, so very simple).
> 
> I don't know what is the problem or how can I check what the problem is...
> ...what I've tried already and which may cause the problem is that I cannot import grass.script (import grass.script) in the Terminal (pyhton) and/or IDLE... it says: module not found...
> 
> Just for your information I run GRASS on a Apple Mac Snow Leopard (10.6.6)
> with Python 2.6.6.
> 
> /johannes
> -- 
> NEU: FreePhone - kostenlos mobil telefonieren und surfen!			
> Jetzt informieren: http://www.gmx.net/de/go/freephone



More information about the grass-user mailing list