I am trying to specify a standard binary format length from a variable but for some reason it never works. Am I doing the formatting wrong or the variable inclusion?
comp.write("{0:%ib}".format(I) % num_bits)
ValueError: Invalid conversion specification