コード例 #1
0
def build_mangler_with_args(args):
    """Return an instance of Mangler with the given parameters."""
    parameters = ManglingParameters()
    parameters.num_file = open(args.numbers_file, 'r').read().splitlines()
    parameters.sym_file = open(args.symbols_file, 'r').read().splitlines()
    if (args.custom_file):
        parameters.cus_file = open(args.custom_file, 'r').read().splitlines()
    parameters.mutation_mode = args.mutation_mode
    parameters.from_year = args.from_year
    parameters.to_year = args.to_year
    parameters.short_year = args.short_year
                      (name, line.strip()))
コード例 #2
0
def build_mangler_with_args(args):
    """Return an instance of Mangler with the given parameters."""
    parameters = ManglingParameters()
    parameters.num_file = open(args.numbers_file, 'r').read().splitlines()
    parameters.sym_file = open(args.symbols_file, 'r').read().splitlines()
    if (args.custom_file):
        parameters.cus_file = open(args.custom_file, 'r').read().splitlines()
    parameters.mutation_mode = args.mutation_mode
    parameters.from_year = args.from_year
    parameters.to_year = args.to_year
    parameters.short_year = args.short_year
    parameters.suffix_pos_swap = args.symbols_before_suffix
    return Mangler(mangling_parameters=parameters)