[GRASS-SVN] r67536 - grass-addons/grass7/gui/wxpython/wx.mwprecip

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jan 10 03:12:35 PST 2016


Author: martinl
Date: 2016-01-10 03:12:34 -0800 (Sun, 10 Jan 2016)
New Revision: 67536

Modified:
   grass-addons/grass7/gui/wxpython/wx.mwprecip/g.gui.mwprecip.py
Log:
g.gui.mwprecip: use set_path() from pygrass - fixes launching from GUI

Modified: grass-addons/grass7/gui/wxpython/wx.mwprecip/g.gui.mwprecip.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.mwprecip/g.gui.mwprecip.py	2016-01-10 11:11:03 UTC (rev 67535)
+++ grass-addons/grass7/gui/wxpython/wx.mwprecip/g.gui.mwprecip.py	2016-01-10 11:12:34 UTC (rev 67536)
@@ -7,9 +7,8 @@
 
 import grass.script as grass
 
-# TODO: replace by pygrass.utils.set_path()
-sys.path.insert(1, os.path.join(os.path.dirname(sys.path[0]), 'etc', 'g.gui.mwprecip'))
-
+from grass.pygrass.utils import set_path
+set_path(modulename='g.gui.mwprecip')
 from grass.script.setup import set_gui_path
 set_gui_path()
 



More information about the grass-commit mailing list