On Tue, Sep 13, 2016 at 10:52 AM, Helmut Kudrnovsky <hel...@web.de> wrote:

> the difference ist that in v.in.natura2000 it's done in def main(); in
> v.in.pygbif it's done before def main()
>


Right, this must be done only after calling grass.script.parser() function
but also in the right scope, so main is usually the right place for short
modules. There are other solutions with using another variable suitable for
more complicated modules (used e.g. in wxGUI), see m.printws:

https://trac.osgeo.org/grass/browser/grass-addons/grass7/misc/m.printws/m.printws.py?rev=69427#L177
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to