Example #1
0
 def iter_options():
     for o in select.findAll("option"):
         term = Term.parse(o.text)
         if term:
             attrs = dict(o.attrs)
             yield (term, attrs["value"])
Example #2
0
 def iter_options():
     for o in select.findAll('option'):
         term = Term.parse(o.text)
         if term:
             attrs = dict(o.attrs)
             yield (term, attrs['value'])
Example #3
0
def term_type(value):
    term = Term.parse(value)
    if term is None:
        raise argparse.ArgumentTypeError("invalid format")
    return term