Exemplo n.º 1
0
    def _print_actions(self):
        print "Available actions:"

        to_print = []
        for key in self._actions:
            raw_desc = self._actions[key].__doc__ or ''
            desc = ' '.join(raw_desc.split())

            to_print.append((key, desc))

        fmt.pprint_col(to_print)
Exemplo n.º 2
0
    def _print_actions(self):
        print "Available actions:"

        to_print = []
        for key in self._actions:
            raw_desc = self._actions[key].__doc__ or ''
            desc = ' '.join(raw_desc.split())

            to_print.append((key, desc))

        fmt.pprint_col(to_print)
Exemplo n.º 3
0
    def print_options(self, method_name):
        self.options = self._get_method_attrs(method_name)
        if len(self.options):
            print "Available options:"

            to_print = []
            for opt in self.options:
                to_print.append(('--%s' % opt.get('name'),
                                 opt.get('help', 'No help provided.')))

            fmt.pprint_col(to_print)
        else:
            print "No option available, sorry !"
Exemplo n.º 4
0
    def print_options(self, method_name):
        self.options = self._get_method_attrs(method_name)
        if len(self.options):
            print "Available options:"

            to_print = []
            for opt in self.options:
                to_print.append(('--%s' % opt.get('name'),
                                 opt.get('help', 'No help provided.')))

            fmt.pprint_col(to_print)
        else:
            print "No option available, sorry !"