(stringify_func)
Setup printing in Python interactive session.
Setup printing in Python interactive session.
Setup printing in Python interactive session .
def _init_python_printing(stringify_func):
    """Setup printing in Python interactive session. """
    import sys
    from sympy.core.compatibility import builtins

    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))
            builtins._ = arg

    sys.displayhook = _displayhook
def _init_python_printing ( stringify_func ) : import sys from sympy . core . compatibility import builtins 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 ) ) builtins . _ = arg sys . displayhook = _displayhook