Ondrej Certik wrote: > On Sat, Apr 18, 2009 at 8:02 AM, Fabian Pedregosa <[email protected]> wrote: >> That way we get a chance to disable line wrapping, which is interesting, for >> example >> for pretty printing to non-terminals (html, etc.) >> --- >> sympy/printing/pretty/pretty.py | 18 +++++++++++++----- >> sympy/printing/pretty/tests/test_pretty_unicode.py | 6 ++++++ >> 2 files changed, 19 insertions(+), 5 deletions(-) >> >> diff --git a/sympy/printing/pretty/pretty.py >> b/sympy/printing/pretty/pretty.py >> index 9a31e46..afa4dcd 100644 >> --- a/sympy/printing/pretty/pretty.py >> +++ b/sympy/printing/pretty/pretty.py >> @@ -14,20 +14,23 @@ >> class PrettyPrinter(Printer): >> """Printer, which converts an expression into 2D ascii-art figure.""" >> >> - def __init__(self, profile=None): >> + def __init__(self, profile=None, wrap=True): >> Printer.__init__(self) >> self.emptyPrinter = lambda x : prettyForm(xstr(x)) >> >> self._settings = { >> "full_prec" : "auto", >> "use_unicode" : True, >> + "wrap" : wrap, >> } > > This should be implemented differently. See the LaTeXPrinter for details. E.g. > > The init should look like this: > > def __init__(self, profile=None): > > and you should add all settings into the profile and change this: > >> self._settings = { >> "full_prec" : "auto", >> "use_unicode" : True, >> + "wrap" : True, >> } > > and then update the pretty to fill in the profile, just like it works > for the "full_prec" setting. >
ok, thanks for the review. I undid the commit, and i'll send a reworked patch for this. > Ondrej > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-patches" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sympy-patches?hl=en -~----------~----~----~----~------~----~------~--~---
