[GRASS-SVN] r52211 - grass/trunk/lib/python
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Jun 25 19:57:31 PDT 2012
Author: hamish
Date: 2012-06-25 19:57:31 -0700 (Mon, 25 Jun 2012)
New Revision: 52211
Modified:
grass/trunk/lib/python/vector.py
Log:
expand/fix vector_db_select() example
Modified: grass/trunk/lib/python/vector.py
===================================================================
--- grass/trunk/lib/python/vector.py 2012-06-25 23:31:18 UTC (rev 52210)
+++ grass/trunk/lib/python/vector.py 2012-06-26 02:57:31 UTC (rev 52211)
@@ -217,8 +217,12 @@
key column value. Example:
\code
- >>> print grass.vector_select('lakes')['values'][3]
+ >>> print grass.vector_db_select('lakes')['columns']
+ (todo: paste in result)
+ >>> 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 = 'cat')['values'][3]
+ ['3']
\endcode
@param map map name
@@ -246,7 +250,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