[GRASS-SVN] r53466 - grass/branches/develbranch_6/gui/wxpython/lmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Oct 18 04:50:40 PDT 2012


Author: martinl
Date: 2012-10-18 04:50:40 -0700 (Thu, 18 Oct 2012)
New Revision: 53466

Modified:
   grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py
Log:
wxGUI: OnSystemInfo - print also info about OSGeo4W
       (merge r53465 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py	2012-10-18 11:46:54 UTC (rev 53465)
+++ grass/branches/develbranch_6/gui/wxpython/lmgr/frame.py	2012-10-18 11:50:40 UTC (rev 53466)
@@ -774,6 +774,7 @@
         """!Print system information"""
         vInfo = grass.version()
         
+        # GDAL/OGR
         try:
             from osgeo import gdal
             gdalVersion = gdal.__version__
@@ -782,10 +783,17 @@
                 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 \
+                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"
@@ -795,13 +803,13 @@
                               "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