Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-26 Thread Glynn Clements
William Kyngesburye wrote: 5. And, it's the Python interpreter that handles this, not GRASS. Though I guess it also depends how you run it. If you run it with just the script name, the shell needs to find the #! before it passes it off to Python, so it might need the unix LF (and this is

Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-25 Thread Johannes Radinger
with the script syntax? cheers /johannes Original-Nachricht Datum: Fri, 25 Mar 2011 12:45:18 +0100 Von: Johannes Radinger jradin...@gmx.at An: Nick Cahill ndcah...@wisc.edu, grass-user@lists.osgeo.org Betreff: Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc) Thank you nick

Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-25 Thread Glynn Clements
Johannes Radinger wrote: I opend the script with text wrangler and there were indeed mac line endings. So I saved it with unix line endings and now it seems to work. Maybe GRASS should be able to handle line endings from various platforms if that is possible... 1. The terminator for the #!

Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-25 Thread William Kyngesburye
On Mar 25, 2011, at 8:32 AM, Glynn Clements wrote: Johannes Radinger wrote: I opend the script with text wrangler and there were indeed mac line endings. So I saved it with unix line endings and now it seems to work. Maybe GRASS should be able to handle line endings from various

Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-23 Thread Johannes Radinger
Am 23.03.2011 um 05:22 schrieb Glynn Clements: Johannes Radinger wrote: I'd like to run a python script on my GRASS6.5 on MacOS. I saved a *.py script for testing with following content on my desktop: All the needed files (upstream_part, shreve) are existing in the location and

Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-23 Thread Nick Cahill
I haven't run python scripts from within GRASS, but have found that they won't run if the line breaks are not unix line breaks, rather than Mac or Windows - which you'll get if you write the script in some applications. BBEdit is a very good editor on the Mac and will run python scripts

[GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-22 Thread Johannes Radinger
Hello, I'd like to run a python script on my GRASS6.5 on MacOS. I saved a *.py script for testing with following content on my desktop: #!/usr/bin/python # #%Module #% description: mapcalc test #%End #%option #% key: upstream_shreve #% type: string #% gisprompt: new,cell,raster #% description:

Re: [GRASS-user] Running a Pyhton Script on Mac (Mapcalc)

2011-03-22 Thread Glynn Clements
Johannes Radinger wrote: I'd like to run a python script on my GRASS6.5 on MacOS. I saved a *.py script for testing with following content on my desktop: All the needed files (upstream_part, shreve) are existing in the location and mapset that is open. Then I tried to execute