select_radio

returns elements that are type radio.

Source


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