[GRASS-SVN] r53487 - grass/branches/releasebranch_6_4/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Oct 19 03:38:58 PDT 2012


Author: martinl
Date: 2012-10-19 03:38:57 -0700 (Fri, 19 Oct 2012)
New Revision: 53487

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/lmgr/frame.py
Log:
wxGUI: backport OnSystemInfo from devbr6


Modified: grass/branches/releasebranch_6_4/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/lmgr/frame.py	2012-10-19 10:36:50 UTC (rev 53486)
+++ grass/branches/releasebranch_6_4/gui/wxpython/lmgr/frame.py	2012-10-19 10:38:57 UTC (rev 53487)
@@ -741,18 +741,42 @@
         """!Print system information"""
         vInfo = grass.version()
         
+        # GDAL/OGR
+        try:
+            from osgeo import gdal
+            gdalVersion = gdal.__version__
+        except:
+            try:
+                gdalVersion = grass.Popen(['gdalinfo', '--version'], stdout = grass.PIPE).communicate()[0].rstrip('\n')
+            except:
+                gdalVersion = _("unknown")
+        # PROJ4
+        try:
+            projVersion = RunCommand('proj', getErrorMsg = True)[1].splitlines()[0]
+        except:
+            projVersion = _("unknown")
+        # check also OSGeo4W on MS Windows
+        if sys.platform == 'win32' and \
+                not os.path.exists(os.path.join(os.getenv("GISBASE"), "WinGRASS-README.url")):
+            osgeo4w = ' (OSGeo4W)'
+        else:
+            osgeo4w = ''
+        
         self.goutput.WriteCmdLog(_("System Info"))
         self.goutput.WriteLog("%s: %s\n"
                               "%s: %s\n"
                               "%s: %s (%s)\n"
+                              "GDAL/OGR: %s\n"
+                              "PROJ4: %s\n"
                               "Python: %s\n"
                               "wxPython: %s\n"
-                              "%s: %s\n"% (_("GRASS version"), vInfo['version'],
+                              "%s: %s%s\n"% (_("GRASS version"), vInfo['version'],
                                            _("GRASS SVN Revision"), vInfo['revision'],
                                            _("GIS Library Revision"), vInfo['libgis_revision'], vInfo['libgis_date'].split(' ', 1)[0],
+                                           gdalVersion, projVersion,
                                            platform.python_version(),
                                            wx.__version__,
-                                           _("Platform"), platform.platform()),
+                                           _("Platform"), platform.platform(), osgeo4w),
                               switchPage = True)
         self.goutput.WriteCmdLog(' ')
     



More information about the grass-commit mailing list