def sstr(expr, **settings):
 p = StrPrinter(settings)
 s = p.doprint(expr)
 return s

def sstr ( expr , ** settings ) : p = StrPrinter ( settings ) s = p . doprint ( expr ) return s
returns the expression as a string .