<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 14, 2014 at 8:58 AM, <span dir="ltr"><<a href="mailto:svn_grass@osgeo.org" target="_blank">svn_grass@osgeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div id=":14r" class="" style="overflow:hidden">+sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'wx.metadata'))</div></blockquote></div><br></div><div class="gmail_extra">Do you this this is robust enough?<br>
<br></div><div class="gmail_extra">There is a function to do something like this. Does this one suite you?<br><br></div><div class="gmail_extra">I still think that the current solution is not good. We probably should have the directory with packages on path and then import like this:<br>
<br><span>from wxmetadata.editor import MdMainEditor</span><br><br></div><div class="gmail_extra">when using the package by module, rather then current:<br><br><span>from editor import MdMainEditor</span><br></div><div class="gmail_extra">
<br></div><div class="gmail_extra">But I think this requires some changes in makefiles, directory layout and naming convections and there is actually a ticket with similar topic.<br></div><div class="gmail_extra"><br><a href="http://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py#L84">http://trac.osgeo.org/grass/browser/grass-addons/grass7/raster/r.modis/r.modis.download/r.modis.download.py#L84</a><br>
<a href="http://trac.osgeo.org/grass/changeset/58208">http://trac.osgeo.org/grass/changeset/58208</a><br><a href="http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/pygrass/functions.py#L270">http://trac.osgeo.org/grass/browser/grass/trunk/lib/python/pygrass/functions.py#L270</a><br>
<a href="http://trac.osgeo.org/grass/ticket/2132">http://trac.osgeo.org/grass/ticket/2132</a><br></div></div>