[GRASS-SVN] r47833 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 22 13:03:12 EDT 2011


Author: martinl
Date: 2011-08-22 10:03:12 -0700 (Mon, 22 Aug 2011)
New Revision: 47833

Modified:
   grass/trunk/gui/wxpython/gui_modules/wxnviz.py
Log:
wxNVIZ: force LC_NUMERIC to C (to avoid crashing)
	todo: find out where gislib is initialized


Modified: grass/trunk/gui/wxpython/gui_modules/wxnviz.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxnviz.py	2011-08-22 16:56:11 UTC (rev 47832)
+++ grass/trunk/gui/wxpython/gui_modules/wxnviz.py	2011-08-22 17:03:12 UTC (rev 47833)
@@ -21,20 +21,21 @@
 """
 
 import sys
+import locale
 from threading import Thread
 from math import sqrt
 from numpy import matrix
 
 from ctypes import *
 try:
-    from grass.lib.gis   import *
-    from grass.lib.raster3d   import *
-    from grass.lib.vector  import *
-    from grass.lib.ogsf  import *
-    from grass.lib.nviz  import *
-    from grass.lib.raster import *
+    from grass.lib.gis      import *
+    from grass.lib.raster3d import *
+    from grass.lib.vector   import *
+    from grass.lib.ogsf     import *
+    from grass.lib.nviz     import *
+    from grass.lib.raster   import *
 except ImportError, e:
-    sys.stderr.write("3D view mode: %s\n" % e)
+    sys.stderr.write(_("3D view mode: %s\n") % e)
     
 from debug import Debug
 
@@ -77,7 +78,9 @@
         log = glog
         progress = gprogress
         
-        G_gisinit("")
+        G_gisinit("wxnviz")
+        # gislib is already initialized (where?)
+        locale.setlocale(locale.LC_NUMERIC, 'C')
         G_set_error_routine(errfunc) 
         G_set_percent_routine(perfunc)
         



More information about the grass-commit mailing list