Exemplo n.º 1
0
def add_global_parameters(parser, optparse=False):
    seen_params = set()
    for task_name, is_without_section, param_name, param in Register.get_all_params():
        if param in seen_params:
            continue
        seen_params.add(param)
        param.add_to_cmdline_parser(parser, param_name, task_name, optparse=optparse, glob=True, is_without_section=is_without_section)
Exemplo n.º 2
0
def set_global_parameters(args):
    # Note that this is not side effect free
    for task_name, is_without_section, param_name, param in Register.get_all_params():
        param.set_global_from_args(param_name, task_name, args, is_without_section=is_without_section)