def string_bool(argument):
    if argument is None:
        msg = 'argument required but none supplied; choose from "True" or "False"'
        raise ValueError(msg)

    elif argument.lower() == 'true':
        return True
    elif argument.lower() == 'false':
        return False
    else:
        raise ValueError('"%s" unknown; choose from "True" or "False"'
                        % argument)
Returns an IPv4Address.
dataset/ETHPy150Open rst2pdf/rst2pdf/rst2pdf/pygments_code_block_directive.py/string_bool--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/internet/iocpreactor/tcp.py/Server.getHost