<div dir="ltr">Hi Calvin, <div><br></div><div>have a look at the corresponding PyQGIS documentation for the QgsFeature.attribute() method: </div><div><br></div><div><a href="http://geoapis.sourcepole.com/qgispyapi/qgsfeature#QgsFeature.attribute">http://geoapis.sourcepole.com/qgispyapi/qgsfeature#QgsFeature.attribute</a><br></div><div><br></div><div><br></div><div>Regards, </div><div><br></div><div>Germán</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-02-14 16:31 GMT-05:00 Jürgen E. Fischer <span dir="ltr"><<a href="mailto:jef@norbit.de" target="_blank">jef@norbit.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Calvin,<br>
<span class=""><br>
On Tue, 14. Feb 2017 at 14:28:14 -0500, C Hamilton wrote:<br>
> Am I missing something here or is the second 'attribute' method invalid?<br>
<br>
</span>It's valid in C++ - in python there is only the method taking the index.<br>
<br>
Alternatively you can pythonically access the attribute with feature[fieldname]<br>
and feature[fieldindex] (also for assignment) and iterate the attributes [attr<br>
for attr in feature].<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Jürgen<br>
<br>
--<br>
Jürgen E. Fischer norBIT GmbH Tel. <a href="tel:%2B49-4931-918175-31" value="+49493191817531">+49-4931-918175-31</a><br>
Dipl.-Inf. (FH) Rheinstraße 13 Fax. <a href="tel:%2B49-4931-918175-50" value="+49493191817550">+49-4931-918175-50</a><br>
Software Engineer D-26506 Norden <a href="http://www.norbit.de" rel="noreferrer" target="_blank">http://www.norbit.de</a><br>
QGIS release manager (PSC) Germany IRC: jef on FreeNode<br>
</font></span><br>______________________________<wbr>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>-----------<br></div><div> |\__ <br>(:>__)(<br> |/ <br>Soluciones Geoinformáticas Libres <br><a href="http://geotux.tuxfamily.org/" target="_blank">http://geotux.tuxfamily.org/</a><br><a href="http://twitter.com/GeoTux2" target="_blank">http://twitter.com/GeoTux2</a></div><div><a href="http://about.me/germancarrillo" target="_blank">http://about.me/germancarrillo</a><br></div><div><div><br></div><div><a href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo" target="_blank"><img src="http://gis.stackexchange.com/users/flair/4972.png"></a></div></div></div></div></div></div></div>
</div>