def us(qty):
    """
    Convert qty to truncated string with unit suffixes.
    eg turn 12345678 into 12.3M
    """

    if qty<1000:
        return str(qty)

    for suf in ['K','M','G','T','P','E']:
        qty /= 1000
        if qty<1000:
            return "%3.1f%s" % (qty, suf)