grass going to python scripting (was Re: [GRASS-user] new module: r.surf.volcano)

maning sambale emmanuel.sambale at gmail.com
Mon Apr 20 21:50:28 EDT 2009


another possible stupid questions:
Am I right that GRASS 7 will use Python as the scripting language,
therefore, unix shell scripting won't be supported anymore?
Should I start learning Python now?  Should I port my scripts to Python?
Will a new GRASS book include Python script samples?

On Tue, Apr 21, 2009 at 4:36 AM, Hamish <hamish_b at yahoo.com> wrote:
>
> Dylan Beaudette wrote:
>> Possible stupid question: do we have a standardized Python
>> script template, something like the old shell-style template?
>
> Possible stupid answer: because unix scripting and python both
> use '#' as the comment character, 'g.module --script' will create
> a script template for both exactly the same. just change the
> shebang line at the top from /bin/sh to /bin/python or whatever
> that has to be and also replace the "are we already in grass?"
> shell-style check at the end.
>
> and of course reuse from the other python scripts in (mostly)
> grass7's scripts/ dir as a good guide for setting up temp files
> and other common but subtle tasks.
>
>
> Hamish
>
>
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>



-- 
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------


More information about the grass-user mailing list