Source
def select_image(self):
ret = pyNodeList()
for node in self:
if node.is_image():
ret.append(node)
if len(ret) == 1: return ret[0]
else: return ret
returns elements that have an attribute type image.
def select_image(self):
ret = pyNodeList()
for node in self:
if node.is_image():
ret.append(node)
if len(ret) == 1: return ret[0]
else: return ret