예제 #1
0
def get_output(locations: [str], output_generators: [str]) -> [[str]]:
    output_gen = OutputGenerators(locations)
    output = []
    for output_generator_type in output_generators:
        output_generator = output_gen.get_ouput_generator(output_generator_type)
        if output_generator != None:
            output.append(output_generator.get_output())

    return output
예제 #2
0
def get_output_generators(num_generators: int) -> [str]:
    output_generators = []
    for i in range(num_generators):
        user_input = input().strip()
        if not OutputGenerators.is_valid_output_generator(user_input):
            _print_error_msg('Invalid output type: {}'.format(user_input if user_input != '' else 'undefined'))
            return None

        output_generators.append(user_input)

    return output_generators