Пример #1
0
def main_func(args, mstdout, mstderr):
    '''The real implementation of the main function:
       o get config
       o set up logging
       o do everything'''
    config, input_mods = MainHelper.main_setup(args, mstdout, mstderr)
    configure_logging(config, mstderr)
    return execute_cmds(config, input_mods, mstdout, mstderr)
Пример #2
0
def main_impl(args, mstdout, mstderr):
    '''The real implementation of the main function:
       o get config
       o set up logging
       o do everything'''
    config, input_mods = MainHelper.main_setup(args, mstdout, mstderr)
    configure_logging(config, mstderr)
    return execute_cmds(config, input_mods, mstdout, mstderr)
Пример #3
0
def main(args, mstdout, mstderr):
    '''Converts the configuration.
       Reads in the given and (pretty) prints the configuration
       to mstdout.'''
    config = MainHelper.main_setup_config(args)
    configure_logging(config, mstderr)
    mstdout.write(json.dumps(config.config, sort_keys=True, indent=4))
    mstdout.write("\n")