sregistry/client/__init__.py
def get_subparsers(parser):
    '''get_subparser will get a dictionary of subparsers, to help with printing help
    '''

    actions = [action for action in parser._actions 
               if isinstance(action, argparse._SubParsersAction)]

    subparsers = dict()
    for action in actions:
        # get all subparsers and print help
        for choice, subparser in action.choices.items():
            subparsers[choice] = subparser

    return subparsers
def get_subparsers(parser):
    '''get_subparser will get a dictionary of subparsers, to help with printing help
    '''

    actions = [action for action in parser._actions 
               if isinstance(action, argparse._SubParsersAction)]

    subparsers = dict()
    for action in actions:
        # get all subparsers and print help
        for choice, subparser in action.choices.items():
            subparsers[choice] = subparser

    return subparsers
def get_subparsers ( parser ) : actions = [ action for action in parser . _actions if isinstance ( action , argparse . _SubParsersAction ) ] subparsers = dict ( ) for action in actions : # get all subparsers and print help for choice , subparser in action . choices . items ( ) : subparsers [ choice ] = subparser return subparsers
get_subparser will get a dictionary of subparsers, to help with printing help
get_subparser will get a dictionary of subparsers to help with printing help