[Qgis-user] pyQGIS : read attributes with qgis 2.2?

dandrigo lcelati at latitude-geosystems.com
Wed Jun 18 07:58:53 PDT 2014


Thanks,

I would like back up attributes data. I tried to do thanks to following
piece of code : 

-----------------------------------------
provider = layer.dataProvider()
layer.select(provider.attributeIndexes())
for f in layer.getFeatures():
    print f['nom','reference','id_espace','table_espace','id_utilisateur']
-------------------------------------------


But when i run the python extension, i can display the layer. But i can't
see the attribut table yet...;-(



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/pyQGIS-read-attributes-with-qgis-2-2-tp5146541p5146548.html
Sent from the Quantum GIS - User mailing list archive at Nabble.com.



More information about the Qgis-user mailing list