소스 검색

wxGUI/launch script: modify PATH for given session

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54492 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 12 년 전
부모
커밋
844e6607b1
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      gui/wxpython/core/utils.py

+ 5 - 1
gui/wxpython/core/utils.py

@@ -866,7 +866,11 @@ def SetAddOnPath(addonPath = None, key = 'PATH'):
     
     StoreEnvVariable(key = 'GRASS_ADDON_' + key, value = addonPath)
     os.environ['GRASS_ADDON_' + key] = addonPath
-
+    
+    # update path
+    if addonPath not in os.environ['PATH']:
+        os.environ['PATH'] = addonPath + os.pathsep + os.environ['PATH']
+    
 # From lib/gis/col_str.c, except purple which is mentioned
 # there but not given RGB values
 str2rgb = {'aqua': (100, 128, 255),