class AlgebraWrapper(textwrap.TextWrapper):
    wordsep_re = re.compile('(\\s+|(?:-|\\+|\\*\\*|\\*|\\)|\\]))')
How to put appropriate line breaks in a string representing a mathematical expression that is 9000+ characters?