[GRASS-dev] g.parser: Note on setting bash' IFS to parse separate identities
Paulo van Breugel
p.vanbreugel at gmail.com
Wed Nov 5 03:35:05 PST 2014
On Wed, Nov 5, 2014 at 12:22 PM, Glynn Clements <glynn at gclements.plus.com>
> Paulo van Breugel wrote:
> > > Or even just remove the reference to bash from the 7.x documentation.
> > > If you're using 7.x, Python is almost mandatory, so why would you
> > > write bash scripts?
> > In what sense mandatory?
> Mandatory in the sense that, if you don't have Python installed, a
> large chunk of GRASS (wxGUI, scripts, temporal framework) will be
> unavailable to you (and you'll have to create your own GRASS sessions,
> because the "grass70" startup script is a Python script).
Ah, sorry, I misread your line as it being mandatory to have scripts
written in python.
> GRASS modules can be executed from any language which has the
> necessary primitives (system() or whatever).
> The main reason people write Bourne shell scripts is that it's the one
> language interpreter that's guaranteed to be present on any Unix
> system. It's certainly not because it's a nice language for writing
> programs (the actual language is inherently compromised by the need
> for it to be usable as an interactive shell).
I am sure python is a nicer language, but right now for me (and the same
might be true for others) bash scripting is easier (not that I am any good
in bash scripting, I just have very little experience in python).
Personally I am working on my Python skills, but that is a slow process.
For me the most useful documentation I have used in that respect is
explanations how to 'translate' bask to python (can't remember right now
which webpage that was though).
> But if you're going to be assuming the existence of GRASS 7 modules,
> Python is even more likely to be installed than a Bourne shell
> (Windows installations typically won't have a Bourne shell).
Yes, perfectly clear, thanks for the explanation (and sorry for my sloppy
reading of the original statement).
> Glynn Clements <glynn at gclements.plus.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-dev