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


Python printing.stringify_func函数代码示例

本文整理汇总了Python中sympy.printing.stringify_func函数的典型用法代码示例。如果您正苦于以下问题:Python stringify_func函数的具体用法?Python stringify_func怎么用?Python stringify_func使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: displayhook

    def displayhook(arg):
        """Python's pretty-printer display hook.

           This function was adapted from:

            http://www.python.org/dev/peps/pep-0217/

        """
        if arg is not None:
            __builtin__._ = None
            print stringify_func(arg)
            __builtin__._ = arg
开发者ID:jhoebing,项目名称:sympy,代码行数:12,代码来源:printing.py

示例2: pretty_print

    def pretty_print(arg, p=None, cycle=None):
        """pretty printer that accepts pretty's arg format."""
        out = stringify_func(arg)

        if '\n' in out:
            print

        print out
开发者ID:jhoebing,项目名称:sympy,代码行数:8,代码来源:printing.py

示例3: _displayhook

    def _displayhook(arg):
        """Python's pretty-printer display hook.

           This function was adapted from:

            http://www.python.org/dev/peps/pep-0217/

        """
        if arg is not None:
            builtins._ = None
            print(stringify_func(arg, **settings))
            builtins._ = arg
开发者ID:AStorus,项目名称:sympy,代码行数:12,代码来源:printing.py

示例4: _result_display

    def _result_display(self, arg):
        """IPython's pretty-printer display hook, for use in IPython 0.10

           This function was adapted from:

            ipython/IPython/hooks.py:155

        """
        if self.rc.pprint:
            out = stringify_func(arg)

            if '\n' in out:
                print

            print out
        else:
            print repr(arg)
开发者ID:Anxuiz,项目名称:sympy,代码行数:17,代码来源:printing.py

示例5: _pretty_print

 def _pretty_print(arg, p, cycle):
     """caller for pretty, for use in IPython 0.11"""
     p.text(stringify_func(arg))
开发者ID:Anxuiz,项目名称:sympy,代码行数:3,代码来源:printing.py

示例6: _print_plain

 def _print_plain(arg, p, cycle):
     """caller for pretty, for use in IPython 0.11"""
     if _can_print_latex(arg):
         p.text(stringify_func(arg))
     else:
         p.text(IPython.lib.pretty.pretty(arg))
开发者ID:AkshaySiramdas,项目名称:sympy,代码行数:6,代码来源:printing.py


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