Did I find the right examples for you? yes no

All Samples(16)  |  Call(13)  |  Derive(0)  |  Import(3)
return pretty representation of an atom

        def pretty_atom(atom_name, default=None):
    """return pretty representation of an atom"""
    if _use_unicode:
        return atoms_table[atom_name]
    else:
        if default is not None:
            return default

        raise KeyError('only unicode')  # send it default printer
        


src/s/y/sympy-0.7.5/sympy/printing/pretty/pretty.py   sympy(Download)
 
from .stringpict import prettyForm, stringPict
from .pretty_symbology import xstr, hobj, vobj, xobj, xsym, pretty_symbol, \
    pretty_atom, pretty_use_unicode, pretty_try_use_unicode, greek_unicode, U, \
    annotated
    def _print_Atom(self, e):
        try:
            # print atoms like Exp1 or Pi
            return prettyForm(pretty_atom(e.__class__.__name__))
        except KeyError:
    def _print_HadamardProduct(self, expr):
        from sympy import MatAdd, MatMul
        if self._use_unicode:
            delim = pretty_atom('Ring')
        else:
    def _print_ExpBase(self, e):
        # TODO should exp_polar be printed differently?
        #      what about exp_polar(0), exp_polar(1)?
        base = prettyForm(pretty_atom('Exp1', 'e'))
        return base ** self._print(e.args[0])
    def _print_Intersection(self, u):
 
        delimiter = ' %s ' % pretty_atom('Intersection')
 
        return self._print_seq(u.args, None, None, delimiter,

src/s/y/sympy-HEAD/sympy/printing/pretty/pretty.py   sympy(Download)
 
from .stringpict import prettyForm, stringPict
from .pretty_symbology import xstr, hobj, vobj, xobj, xsym, pretty_symbol, \
    pretty_atom, pretty_use_unicode, pretty_try_use_unicode, greek_unicode, U, \
    annotated
    def _print_Atom(self, e):
        try:
            # print atoms like Exp1 or Pi
            return prettyForm(pretty_atom(e.__class__.__name__))
        except KeyError:
    def _print_HadamardProduct(self, expr):
        from sympy import MatAdd, MatMul
        if self._use_unicode:
            delim = pretty_atom('Ring')
        else:
    def _print_ExpBase(self, e):
        # TODO should exp_polar be printed differently?
        #      what about exp_polar(0), exp_polar(1)?
        base = prettyForm(pretty_atom('Exp1', 'e'))
        return base ** self._print(e.args[0])
    def _print_Intersection(self, u):
 
        delimiter = ' %s ' % pretty_atom('Intersection')
 
        return self._print_seq(u.args, None, None, delimiter,

src/s/y/sympy-polys-HEAD/sympy/printing/pretty/pretty.py   sympy-polys(Download)
from sympy import Interval
 
from pretty_symbology import xstr, hobj, vobj, xobj, xsym, pretty_symbol,\
        pretty_atom, pretty_use_unicode, pretty_try_use_unicode, greek
 
    def _print_Atom(self, e):
        try:
            # print atoms like Exp1 or Pi
            return prettyForm(pretty_atom(e.__class__.__name__))
        except KeyError:
    def _print_exp(self, e):
        base = prettyForm(pretty_atom('Exp1', 'e'))
        return base ** self._print(e.args[0])
 
    def _print_Function(self, e):
                other_sets.append(set)
 
        union_delimiter = ' %s ' % pretty_atom('Union')
 
        s2 = self._print_seq(other_sets, None, None, union_delimiter)