Source
def select_button(self):
ret = pyNodeList()
for node in self:
if node.name() == 'button':
ret.append(node)
else:
t = node.attr('type')
if t is not None and t.lower() == 'button':
ret.append(node)
if len(ret) == 1: return ret[0]
else: return ret