[GRASS-SVN] r36378 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Mar 14 10:28:55 EDT 2009


Author: martinl
Date: 2009-03-14 10:28:55 -0400 (Sat, 14 Mar 2009)
New Revision: 36378

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/dbm.py
Log:
wxGUI: v.what locale problem (switch to 'C')
       TODO: implement script-style output in v.what


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/dbm.py	2009-03-14 14:01:45 UTC (rev 36377)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/dbm.py	2009-03-14 14:28:55 UTC (rev 36378)
@@ -3335,7 +3335,11 @@
         Return line id or None if no line is found"""
         line = None
         nselected = 0
+        if os.environ.has_key("LC_ALL"):
+            locale = os.environ["LC_ALL"]
+            os.environ["LC_ALL"] = "C"
         
+        ### FIXME (implement script-style output)
         cmdWhat = gcmd.Command(cmd=['v.what',
                                    '-a', '--q',
                                     'map=%s' % self.map,
@@ -3343,6 +3347,9 @@
                                         (float(queryCoords[0]), float(queryCoords[1])),
                                     'distance=%f' % qdist], stderr=None)
         
+        if os.environ.has_key("LC_ALL"):
+            os.environ["LC_ALL"] = locale
+        
         data = {}
         if cmdWhat.returncode == 0:
             readAttrb = False



More information about the grass-commit mailing list