<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 13, 2016 at 10:52 AM, Helmut Kudrnovsky <span dir="ltr"><<a target="_blank" href="mailto:hellik@web.de">hellik@web.de</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div class="gmail-a3s gmail-aXjCH gmail-m157240900d43b083" id="gmail-:14n">the difference ist that in v.in.natura2000 it's done in def main(); in<br>
v.in.pygbif it's done before def main()</div></blockquote></div><br><br></div><div class="gmail_extra">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:<br><br><a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/misc/m.printws/m.printws.py?rev=69427#L177">https://trac.osgeo.org/grass/browser/grass-addons/grass7/misc/m.printws/m.printws.py?rev=69427#L177</a><br></div></div>