addok/shell.py
def do_help(self, command):
        """Display this help message."""
        if command:
            doc = getattr(self, 'do_' + command).__doc__
            print(cyan(doc.replace(' ' * 8, '')))
        else:
            print(magenta('Available commands:'))
            print(magenta('Type "HELP <command>" to get more info.'))
            names = self.get_names()
            names.sort()
            for name in names:
                if name[:3] != 'do_':
                    continue
                doc = getattr(self, name).__doc__
                doc = doc.split('\n')[0]
                print('{} {}'.format(yellow(name[3:]),
                                     cyan(doc.replace(' ' * 8, ' ')
                                             .replace('\n', ''))))
def do_help(self, command):
        """Display this help message."""
        if command:
            doc = getattr(self, 'do_' + command).__doc__
            print(cyan(doc.replace(' ' * 8, '')))
        else:
            print(magenta('Available commands:'))
            print(magenta('Type "HELP <command>" to get more info.'))
            names = self.get_names()
            names.sort()
            for name in names:
                if name[:3] != 'do_':
                    continue
                doc = getattr(self, name).__doc__
                doc = doc.split('\n')[0]
                print('{} {}'.format(yellow(name[3:]),
                                     cyan(doc.replace(' ' * 8, ' ')
                                             .replace('\n', ''))))
def do_help ( self , command ) : if command : doc = getattr ( self , 'do_' + command ) . __doc__ print ( cyan ( doc . replace ( ' ' * 8 , '' ) ) ) else : print ( magenta ( 'Available commands:' ) ) print ( magenta ( 'Type "HELP <command>" to get more info.' ) ) names = self . get_names ( ) names . sort ( ) for name in names : if name [ : 3 ] != 'do_' : continue doc = getattr ( self , name ) . __doc__ doc = doc . split ( '\n' ) [ 0 ] print ( '{} {}' . format ( yellow ( name [ 3 : ] ) , cyan ( doc . replace ( ' ' * 8 , ' ' ) . replace ( '\n' , '' ) ) ) )
Display this help message.
Display this help message .