I am trying to go through a for loop in QGIS's Python module in reverse order for my features.
from qgis.utils import iface from PyQt4.QtCore import * layers = iface.legendInterface().layers() for layer in layers: name = layer.name() myLayer = QgsMapLayerRegistry.instance().mapLayersByName( name ) if name.startswith('Test'): for f in layer.getFeatures():
I would like to be able to go through that second for loop in reverse order. I know python has the reversed() function but that is only for lists. I can't seem to use it for layer.getFeatures().
Is there a way to do this?