[GRASS-SVN] r67739 - grass/branches/releasebranch_7_0/lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 6 06:36:16 PST 2016


Author: martinl
Date: 2016-02-06 06:36:16 -0800 (Sat, 06 Feb 2016)
New Revision: 67739

Modified:
   grass/branches/releasebranch_7_0/lib/python/script/setup.py
Log:
pythonlib: backport set_gui_path() from trunk, needed for wx.mprecip addon

Modified: grass/branches/releasebranch_7_0/lib/python/script/setup.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/script/setup.py	2016-02-06 13:22:43 UTC (rev 67738)
+++ grass/branches/releasebranch_7_0/lib/python/script/setup.py	2016-02-06 14:36:16 UTC (rev 67739)
@@ -109,6 +109,13 @@
     return gisrc
 
 
+def set_gui_path():
+    """Insert wxPython GRASS path to sys.path."""
+    gui_path = os.path.join(os.environ['GISBASE'], 'gui', 'wxpython')
+    if gui_path and gui_path not in sys.path:
+        sys.path.insert(0, gui_path)
+
+
 # TODO: there should be a function to do the clean up
 # (unset the GISRC and delete the file)
 def init(gisbase, dbase='', location='demolocation', mapset='PERMANENT'):



More information about the grass-commit mailing list