+ log(table_entries)
+ # now got the table: print it out
+
+ # create the markdown header. first line: | |00|01|10|11| |
+ table = []
+ line = [" "*6]
+ for j in range(1<<(half)):
+ hdr = binmaxed(half, j)
+ line.append(maxme(maxnamelen, hdr))
+ line.append(" "*6)
+ table.append("|" + "|".join(line) + "|")
+ # second line: |--|--|--|--|--|--|
+ line = ["-"*6] + ["-"*maxnamelen] * (1<<(half)) + ["-"*6]
+ table.append("|" + "|".join(line) + "|")
+
+ # now the rows, the row number goes into first and last column
+ for i in range(1<<(bitlen-half)):
+ hdr = binmaxed(6, i)
+ line = [hdr]
+ for j in range(1<<(half)):
+ line.append(maxme(maxnamelen, table_entries[i][j] or " "))
+ line.append(hdr)
+ table.append("|" + "|".join(line) + "|")
+
+ print("\n".join(table))