当前位置: 首页>>代码示例>>Python>>正文


Python OptionParser.output_encoding方法代码示例

本文整理汇总了Python中docutils.frontend.OptionParser.output_encoding方法的典型用法代码示例。如果您正苦于以下问题:Python OptionParser.output_encoding方法的具体用法?Python OptionParser.output_encoding怎么用?Python OptionParser.output_encoding使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在docutils.frontend.OptionParser的用法示例。


在下文中一共展示了OptionParser.output_encoding方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from docutils.frontend import OptionParser [as 别名]
# 或者: from docutils.frontend.OptionParser import output_encoding [as 别名]
    def __init__(self, document, docstring_linker):
        # Set the document's settings.
        if self.settings is None:
            settings = OptionParser([LaTeXWriter()]).get_default_values()
            settings.output_encoding = 'utf-8'
            self.__class__.settings = settings
        document.settings = self.settings

        LaTeXTranslator.__init__(self, document)
        self._linker = docstring_linker

        # Start at section level 3.  (Unfortunately, we now have to
        # set a private variable to make this work; perhaps the standard
        # latex translator should grow an official way to spell this?)
        self.section_level = 3
        self._section_number = [0]*self.section_level
开发者ID:antlong,项目名称:epydoc,代码行数:18,代码来源:restructuredtext.py

示例2: __init__

# 需要导入模块: from docutils.frontend import OptionParser [as 别名]
# 或者: from docutils.frontend.OptionParser import output_encoding [as 别名]
    def __init__(self, document, docstring_linker=None, directory=None,
                 docindex=None, context=None):
        # Set the document's settings.
        if self.settings is None:
            settings = OptionParser([LaTeXWriter()]).get_default_values()
            settings.output_encoding = 'utf-8'
            
            # This forces eg \EpydocUserSection rather than
            # \EpydocUserSEction*:
            settings.use_latex_toc = True
            
            self.__class__.settings = settings
        document.settings = self.settings

        LaTeXTranslator.__init__(self, document)
        self._linker = docstring_linker
        self._directory = directory
        self._docindex = docindex
        self._context = context

        # Use custom section names.
        self.d_class = _EpydocDocumentClass()
开发者ID:jlerouge,项目名称:epydoc,代码行数:24,代码来源:restructuredtext.py


注:本文中的docutils.frontend.OptionParser.output_encoding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。