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


Python Ui.log方法代码示例

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


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

示例1: InkTex

# 需要导入模块: from ui import Ui [as 别名]
# 或者: from ui.Ui import log [as 别名]
class InkTex(inkex.Effect):
    """
    Our main class, derived from inkex.Effect. It wraps the other classes and
    implements the effect() function.
    """

    def __init__(self):
        inkex.Effect.__init__(self)

        # the original (i.e., selected) svg element and the newly created one
        # including the original LaTeX source.
        self.orig = None
        self.orig_src = None
        self.new = None
        self.new_src = None

    def effect(self):
        """If there is an original element, store it. Open the GUI."""

        self.orig, self.orig_src = self.get_original()

        self.ui = Ui(self.render, self.orig_src, self.get_settings())
        self.ui.main()

    def render(self, tex, settings):
        """Execute the rendering and, upon errors, send them to the UI"""

        self.new_src = tex
        self.store_settings(settings)

        with Converter(self) as renderer:
            try:
                self.new = renderer.render(self.new_src, settings)
                self.copy_styles()
                self.store_src_information()
                self.append_or_replace()

                return True
            except Exception, e:
                self.ui.log(e.message)
开发者ID:janoliver,项目名称:inktex,代码行数:42,代码来源:inktex_cls.py


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