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


Python Token.output方法代码示例

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


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

示例1: output

# 需要导入模块: from template_preprocessor.core.lexer import Token [as 别名]
# 或者: from template_preprocessor.core.lexer.Token import output [as 别名]
    def output(self, handler):
        if self.__double_quotes:
            handler('"')

        Token.output(self, handler)

        if self.__double_quotes:
            handler('"')
开发者ID:bryanveloso,项目名称:django-template-preprocessor,代码行数:10,代码来源:html_processor.py

示例2: output

# 需要导入模块: from template_preprocessor.core.lexer import Token [as 别名]
# 或者: from template_preprocessor.core.lexer.Token import output [as 别名]
 def output(self, handler):
     # Blocktrans output
     handler(u"{%blocktrans ")
     for p in self.params:
         p.output(handler)
         handler(u" ")
     handler(u"%}")
     Token.output(self, handler)
     handler(u"{%endblocktrans%}")
开发者ID:sentido,项目名称:django-template-preprocessor,代码行数:11,代码来源:django_processor.py

示例3: output

# 需要导入模块: from template_preprocessor.core.lexer import Token [as 别名]
# 或者: from template_preprocessor.core.lexer.Token import output [as 别名]
 def output(self, handler):
     # Blocktrans output
     handler(u'{%blocktrans ');
     for p in self.params:
         p.output(handler)
         handler(u' ')
     handler(u'%}')
     Token.output(self, handler)
     handler(u'{%endblocktrans%}')
开发者ID:marram,项目名称:django-template-preprocessor,代码行数:11,代码来源:django_processor.py

示例4: output

# 需要导入模块: from template_preprocessor.core.lexer import Token [as 别名]
# 或者: from template_preprocessor.core.lexer.Token import output [as 别名]
    def output(self, handler):
        # Yield this node's content, or if the variable name
        # has been changed, use the modified name.
        if self.__varname:
            handler(self.__varname)

        elif self.__link_to:
            self.__link_to.output(handler)

        else:
            Token.output(self, handler)
开发者ID:globocom,项目名称:django-template-preprocessor,代码行数:13,代码来源:js_processor.py

示例5: output

# 需要导入模块: from template_preprocessor.core.lexer import Token [as 别名]
# 或者: from template_preprocessor.core.lexer.Token import output [as 别名]
    def output(self, handler):
        handler('<script ')
        handler(u' '.join([ u'%s%s' % (a, self.__attrs[a]) for a in self.__attrs.keys() ]))
        handler('>')

        if not self.is_external:
            handler('//<![CDATA[\n')

        Token.output(self, handler)

        if not self.is_external:
            handler(u'//]]>\n')

        handler(u'</script>')
开发者ID:sentido,项目名称:django-template-preprocessor,代码行数:16,代码来源:html_processor.py

示例6: output

# 需要导入模块: from template_preprocessor.core.lexer import Token [as 别名]
# 或者: from template_preprocessor.core.lexer.Token import output [as 别名]
 def output(self, handler):
     handler(u'{%ifdebug%}')
     Token.output(self, handler)
     handler(u'{%endifdebug%}')
开发者ID:bryanveloso,项目名称:django-template-preprocessor,代码行数:6,代码来源:django_processor.py


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