click_autodoc.py 文件源码

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

项目:cuvner 作者: meejah 项目源码 文件源码
def write_usage(self, prog, args='', prefix='Usage: '):
        """Writes a usage line into the buffer.

        :param prog: the program name.
        :param args: whitespace separated list of arguments.
        :param prefix: the prefix for the first line.
        """
        title = nodes.subtitle()
        title.append(nodes.literal('', '{} {}'.format(self._topname, prog)))
        usage = nodes.paragraph()
        usage.append(nodes.Text(prefix))
        usage.append(nodes.literal('', '{} {} {}'.format(self._topname, prog, args)))
        self._node.append(title)
        self._node.append(usage)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号