select_file

returns input elements with the attribute type file.

Source


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