Exemplo n.º 1
0
def get_help_text(argv):
    if argv:

        return getRouteHelp(argv[0].split('/'))

    else:

        return '\n'.join([
            'Usage:',
            '  $ ec module_path [flag] <command route> [args]',
            '\nFlags',
            ' -h    show help.',
            ' -p    execute a command with partial args.',
            '\nMembers\n-------\n',
            getRouteHelp([]),
        ])
Exemplo n.º 2
0
def get_help_text(argv):
  if argv:

    return getRouteHelp(argv[0].split('/'))

  else:

    return '\n'.join(['Usage:',
      '  $ ec module_path [flag] <command route> [args]',
      '\nFlags',
      ' -h    show help.',
      ' -p    execute a command with partial args.',
      '\nMembers\n-------\n',
      getRouteHelp([]),
    ]
    )
Exemplo n.º 3
0
def help(route):
  r"""Displays help for the given route.

  Args:
    route (str): A route that resolves a member.
  """
  help_text = getRouteHelp(route.split('/') if route else [])

  if help_text is None:
    err('Can\'t help :(')

  else:
    print '\n%s' % help_text