def prettySize(bytes):
    if bytes is None: return "-"
    size = float(bytes)
    l = -1
    while size >= 1000:
        size /= 1024.
        l += 1
    return "%.2f %sB" % (size, "kMGTPEY"[l] if l >= 0 else "")
dataset/ETHPy150Open grawity/hacks/hacks/Dead-projects/Win32/df.py/prettySize/original