本文整理汇总了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
示例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
示例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
示例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)
示例5: _pretty_print
def _pretty_print(arg, p, cycle):
"""caller for pretty, for use in IPython 0.11"""
p.text(stringify_func(arg))
示例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))