I have got this script on Python 2.6 with RHEL OS:
import csv def write_cols(data): col_spacer = \" \" # added between columns widths = [0] * len
You need to change this
"{:<{width}}".format(col, width=widths[index])
to this
"{0:<{1}}".format(col, widths[index])
and it will work.