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([]), ])
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([]), ] )
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