Ejemplo n.º 1
0
def splitPoolMap(s, count):
    chunks = pool_map_chunks(s, count)
    acc = []
    count = 0
    for chunk in chunks:
        chunk_len = len(chunk)
        acc.append(str(count).rjust(3) + ' ' + chunk + ' ' +
                   str(count + chunk_len - 1).ljust(4))
        count += chunk_len
    return '\n' + '\n'.join(acc)
Ejemplo n.º 2
0
def print_map(name, pool_map, step, out):
    sep = '*' * 80
    out.write(sep + "\n")
    out.write("%s: \n" % name)
    out.write(sep + "\n")
    count = 0
    for chunk in pool_map_chunks(pool_map, step):
        chunk_len = len(chunk)
        out.write(("%s " % count).rjust(4))
        out.write((chunk + " %d\n") % (count + chunk_len - 1))
        count += chunk_len