[GRASS-SVN] r47979 - grass/branches/develbranch_6/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Aug 30 12:33:31 EDT 2011
Author: martinl
Date: 2011-08-30 09:33:31 -0700 (Tue, 30 Aug 2011)
New Revision: 47979
Modified:
grass/branches/develbranch_6/lib/python/core.py
Log:
pythonlib: format version() output
(merge r47977 from trunk)
Modified: grass/branches/develbranch_6/lib/python/core.py
===================================================================
--- grass/branches/develbranch_6/lib/python/core.py 2011-08-30 16:29:55 UTC (rev 47978)
+++ grass/branches/develbranch_6/lib/python/core.py 2011-08-30 16:33:31 UTC (rev 47979)
@@ -1022,14 +1022,18 @@
"""!Get GRASS version as dictionary
@code
- version()
+ print version()
- {'date': '2011', 'libgis_revision': '45093 ', 'version': '6.5.svn',
- 'libgis_date': '2011-01-20 13:10:50 +0100 (Thu, 20 Jan 2011) ', 'revision': '45136'}
+ {'date': '2011', 'libgis_date': '2011-02-26 21:31:24 +0100 (Sat, 26 Feb 2011)',
+ 'version': '6.5.svn', 'libgis_revision': '45467', 'revision': '47305'}
@endcode
"""
- return parse_command('g.version',
+ data = parse_command('g.version',
flags = 'rg')
+ for k, v in data.iteritems():
+ data[k.strip()] = v.replace('"', '').strip()
+
+ return data
# get debug_level
if find_program('g.gisenv', ['--help']):
More information about the grass-commit
mailing list