[GRASS-user] Error in pansharp tool: missing grass.script

Nikos Alexandris nik at nikosalexandris.net
Thu Jun 25 19:57:29 PDT 2015


* Vaclav Petras <wenzeslaus at gmail.com> [2015-06-25 11:42:45 -0400]:

> On Thu, Jun 25, 2015 at 11:38 AM, Nikos Alexandris <nik at nikosalexandris.net>
> wrote:
> 
> > Yep, but a scripter wouldn't want to repeat `grass.script.` everytime.
> > Would he?
> >
> 
> That's why I think
> 
> import grass.script as gscript
> 
> should be used. The examples were just showing different scenarios and
> possible confusion.
> 
> I past I was thinking about it and at the beginning I though that we should
> use
> 
> import grass.script.core as gcore
> import grass.script.raster as graster
> ...
> 
> which is most detailed and allows for an empty __init__.py in script
> directory, but after trying it, considering the existing practice, and
> state of grass.script package, I decided that
> 
> import grass.script as gscript
> 
> is better.

Makes sense.  If someone can come up with something even better, please
chime in.  Thanks for demonstrating it Vaclav,

Nikos


More information about the grass-user mailing list