def get_fixed_option_value (option, s):
    if option.type=='float': return fix_float_string(s)
    if option.type=='int': return fix_int_string(s)
    if option.type=='long': return fix_int_string(s)
    if option.type=='choice':
        choices = map(str, option.choices)
        try:
            return option.choices[choices.index(str(s))]
        except __HOLE__:
            pass
    return s
dataset/ETHPy150Open pearu/pylibtiff/libtiff/optparse_gui.py/get_fixed_option_value