[GRASS-SVN] r52214 - grass/branches/releasebranch_6_4/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 25 20:06:15 PDT 2012
Author: hamish
Date: 2012-06-25 20:06:15 -0700 (Mon, 25 Jun 2012)
New Revision: 52214
Modified:
grass/branches/releasebranch_6_4/lib/python/vector.py
Log:
expand/fix vector_db_select() example (merge from trunk)
Modified: grass/branches/releasebranch_6_4/lib/python/vector.py
===================================================================
--- grass/branches/releasebranch_6_4/lib/python/vector.py 2012-06-26 03:05:58 UTC (rev 52213)
+++ grass/branches/releasebranch_6_4/lib/python/vector.py 2012-06-26 03:06:15 UTC (rev 52214)
@@ -176,8 +176,12 @@
key column value. Example:
\code
- >>> print grass.vector_select('lakes')['values'][3]
+ >>> print grass.vector_db_select('lakes')['columns']
+ ['cat', 'AREA', 'PERIMETER', 'FULL_HYDRO', 'FULL_HYDR2', 'FTYPE', 'FCODE', 'NAME']
+ >>> print grass.vector_db_select('lakes')['values'][3]
['3', '19512.86146', '708.44683', '4', '55652', 'LAKE/POND', '39000', '']
+ >>> print grass.vector_db_select('lakes', column = 'FTYPE')['values'][3]
+ ['LAKE/POND']
\endcode
@param map map name
@@ -205,7 +209,7 @@
**kwargs)
if not ret:
- error(_('vector_select() failed'))
+ error(_('vector_db_select() failed'))
return { 'columns' : [], 'values' : {} }
columns = []
More information about the grass-commit
mailing list