main.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:rshell 作者: dhylands 项目源码 文件源码
def do_help(self, line):
        """help [COMMAND]

           List available commands with no arguments, or detailed help when
           a command is provided.
        """
        # We provide a help function so that we can trim the leading spaces
        # from the docstrings. The builtin help function doesn't do that.
        if not line:
            cmd.Cmd.do_help(self, line)
            self.print("Use Control-D to exit rshell.")
            return
        parser = self.create_argparser(line)
        if parser:
            parser.print_help()
            return
        try:
            doc = getattr(self, 'do_' + line).__doc__
            if doc:
                self.print("%s" % trim(doc))
                return
        except AttributeError:
            pass
        self.print(str(self.nohelp % (line,)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号