code: def _do_write(fname, variable, version, date, table):
          
          # pylint: disable=R0914
          #         Too many local variables (19/15) (col 4)
          print("writing {} ..".format(fname))
          import unicodedata
          import datetime
          import string
          utc_now = datetime.datetime.utcnow()
          indent = 4
          with open(fname, 'w') as fout:
              fout.write(
                  '"""{variable_proper} table. Created by setup.py."""\n'
                  "# Generated: {iso_utc}\n"
                  "# Source: {version}\n"
                  "# Date: {date}\n"
                  "{variable} = (".format(iso_utc=utc_now.isoformat(),
                                          version=version,
                                          date=date,
                                          variable=variable,
                                          variable_proper=variable.title()))
              for start, end in table:
                  ucs_start, ucs_end = unichr(start), unichr(end)
                  hex_start, hex_end = ('0x{0:04x}'.format(start),
                                        '0x{0:04x}'.format(end))
                  try:
                      name_start = string.capwords(unicodedata.name(ucs_start))
                  except ValueError:
                      name_start = u''
                  try:
                      name_end = string.capwords(unicodedata.name(ucs_end))
                  except ValueError:
                      name_end = u''
                  fout.write('\n' + (' ' * indent))
                  fout.write('({0}, {1},),'.format(hex_start, hex_end))
                  fout.write('  # {0:24s}..{1}'.format(
                      name_start[:24].rstrip() or '(nil)',
                      name_end[:24].rstrip()))
              fout.write('\n)\n')
          print("complete.")
docs: Write combining tables to filesystem as python code.