<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 2, 2015 at 4:08 PM, Helmut Kudrnovsky <span dir="ltr"><<a href="mailto:hellik@web.de" target="_blank">hellik@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> better than this is the approach taken in v.flexture where you let parser<br>
> run and then you import the special dependencies. v.class.mlpy and<br>
> especially <a href="http://v.class.ml" rel="noreferrer" target="_blank">v.class.ml</a> are more complicated cases where the dependencies<br>
> are<br>
> spread more through the code but similar approach is still applicable.<br>
><br>
> As you can see from v.flexture, there was an idea to provide a way how to<br>
> install the dependencies but this might be too difficult and suggestions<br>
> in<br>
> the error message or manual might be just the right thing to do.<br>
><br>
> Vaclav<br>
><br>
> <a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.flexure/v.flexure.py" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.flexure/v.flexure.py</a><br>
> <a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.class.mlpy/v.class.mlpy.py" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.class.mlpy/v.class.mlpy.py</a><br>
> <a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.class.ml/v.class.ml.py" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.class.ml/v.class.ml.py</a><br>
<br>
</span>thanks for your hints.<br>
<br>
as I'm not a python guru, I've changed it like this way to catch if<br>
dependency pyspatalite isn't installed:<br></blockquote><div><br></div><div>Thanks. This is pretty good. (Except for the indent, use pep8.)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<a href="https://trac.osgeo.org/grass/changeset?reponame=&new=67009%40grass-addons%2Fgrass7%2Fvector%2Fv.in.natura2000%2Fv.in.natura2000.py&old=66995%40grass-addons%2Fgrass7%2Fvector%2Fv.in.natura2000%2Fv.in.natura2000.py" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/changeset?reponame=&new=67009%40grass-addons%2Fgrass7%2Fvector%2Fv.in.natura2000%2Fv.in.natura2000.py&old=66995%40grass-addons%2Fgrass7%2Fvector%2Fv.in.natura2000%2Fv.in.natura2000.py</a><br>
<br>
or<br>
<br>
<a href="https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.in.natura2000/v.in.natura2000.py#L151" rel="noreferrer" target="_blank">https://trac.osgeo.org/grass/browser/grass-addons/grass7/vector/v.in.natura2000/v.in.natura2000.py#L151</a><br>
</blockquote></div><br><br></div></div>