(n, decimals=3, total=None)
return s
Work around borken python float formatting
Work around borken python float formatting
Work around borken python float formatting
def fmtfloat(n, decimals=3, total=None):
    "Work around borken python float formatting"
    s="%0.*f" % (decimals, n)
    if total:
        s=(" "*total+s)[-total:]
    return s
def fmtfloat ( n , decimals = 3 , total = None ) : s = "%0.*f" % ( decimals , n ) if total : s = ( " " * total + s ) [ - total : ] return s