import os, sys TEST = False num_styles = 30 if TEST: en = 3 else: en = num_styles + 1 ss = '/Users/cynthia/tmp/paultremblay/docutilsToFo/xsl_fo/table_extended.xsl' write_obj = file(ss, 'w') start= """ \n\n""" write_obj.write(start) # write attribute sets for n in range(1,en): s = """\n 12pt 12pt \n""" % (n) write_obj.write(s) s = """\n fixed 100%% \n""" % (n) write_obj.write(s) s = """\n \n""" % (n) write_obj.write(s) s = """\n \n""" % (n) write_obj.write(s) s = """\n \n""" % (n) write_obj.write(s) s = """\n \n""" % (n) write_obj.write(s) s = """\n \n""" % (n) write_obj.write(s) s = """\n always \n""" % (n) write_obj.write(s) s = """\n \n""" % (n) write_obj.write(s) s = """\n \n""" % (n) write_obj.write(s) s = """\n \n""" write_obj.write(s) s = """\n 1 \n""" write_obj.write(s) s= """\n """ write_obj.write(s) for n in range(1,en): s= """\n \n""" % (n, n) write_obj.write(s) s= """\n \n""" write_obj.write(s) s = """\n 1 1 \n""" write_obj.write(s) s= """\n \n""" write_obj.write(s) for n in range(1,en): s = """\n \n""" % (n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n,n) write_obj.write(s) s ="""\n \n\n""" write_obj.write(s) end = '' write_obj.write(end) write_obj.close()