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
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
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 #!
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
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
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
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:
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