def calc_usage(blockdir):
    return (sum((os.path.getsize((blockdir + f)) for f in os.listdir(blockdir) if os.path.isfile(os.path.join(blockdir, f)))) / (1024.0 * 1024.0))
def calc_usage(blockdir):
    return (sum((os.path.getsize((blockdir + f)) for f in os.listdir(blockdir) if os.path.isfile(os.path.join(blockdir, f)))) / (1024.0 * 1024.0))