def __init__(self, source='', file=''): if source and file: raise ValueError('ambiguous call') elif file: self.lamone = ulist(parse(open(file))) else: self.lamone = ulist(parse(source))
frog_input = parse(""" - label: name input: name: name size: 10 class: t id: name - label: color input: name: color size: 10 class: t id: color - label: line input: name: line size: 10 class: t id: line - label: comment input: name: comment size: 40 newline: 1 - label: comment textarea: name: comment cols: 60 rows: 4 newline: 1 """)