'show this help'

def do_help(self, arg):

    if arg:
        try:
            func = getattr(self, ('help_' + arg))
        except AttributeError:
            try:
                m = self.pupsrv.get_module(self.pupsrv.get_module_name_from_category(arg))
                if m:
                    self.do_run((arg + '    --help'))
                    return
            except AttributeError:
                pass
            self.stdout.write(('%s\n' % str((self.nohelp % (arg,)))))
            return
        func()
    else:
        names = self.get_names()
        cmds_doc = []
        help = {}
        for name in names:
            if (name[:5] == 'help_'):
                help[name[5:]] = 1
        names.sort()
        prevname = ''
        for name in names:
            if ((name[:3] == 'do_') and (not (name == 'do_EOF'))):
                if (name == prevname):
                    continue
                prevname = name
                cmd = name[3:]
                if (cmd in help):
                    cmds_doc.append(cmd)
                    del help[cmd]
                elif getattr(self, name).__doc__:
                    cmds_doc.append((cmd, getattr(self, name).__doc__.strip()))
                else:
                    cmds_doc.append((cmd, ''))
        for name in [x for x in self.aliases.iterkeys()]:
            cmds_doc.append((name, self.pupsrv.get_module(self.aliases[name]).__doc__))
        self.stdout.write(('%s\n' % str(self.doc_header)))
        for (command, doc) in cmds_doc:
            if (doc is None):
                doc = ''
            self.stdout.write('-    {:<15}                {}\n'.format(command, color(doc.title().strip(), 'grey')))
