Lines Matching refs:out_file
1167 def WriteFieldsRangeProps(fields, start, end, props, out_file): argument
1170 out_file.write(";".join(fields))
1171 out_file.write("\n")
1190 def WritePreparsedUCD(out_file): argument
1191 out_file.write("""# Preparsed UCD generated by ICU preparseucd.py
1195 out_file.write("ucd;%s\n\n" % _ucd_version)
1201 out_file.write(";".join(["property", prop[0]] + prop[1]))
1202 out_file.write("\n")
1203 out_file.write("\n")
1204 out_file.write(";".join(["binary"] + _binary_values["N"]))
1205 out_file.write("\n")
1206 out_file.write(";".join(["binary"] + _binary_values["Y"]))
1207 out_file.write("\n")
1213 out_file.write(";".join(["value", prop[1][0]] + prop[3][name]))
1214 out_file.write("\n")
1215 out_file.write("\n")
1225 WriteFieldsRangeProps(["defaults"], 0, 0x10ffff, _defaults, out_file)
1238 WriteFieldsRangeProps(["\nblock"], b[0], b_end, b[2], out_file)
1243 out_file.write("# %04lX..%04lX %s\n" % (h[0], h[1], EscapeNonASCII(h[2])))
1251 out_file.write(";".join(fields))
1252 out_file.write("\n")
1256 out_file.write("# %s\n" % EscapeNonASCII(_h2[i_h2][1]))
1265 out_file.write("\n# No block\n")
1273 WriteFieldsRangeProps([line_type], start, end, props, out_file)
1278 def WriteAllCC(out_file): argument
1279 out_file.write("# Canonical_Combining_Class (ccc) values\n");
1291 out_file.write("%04X:%d\n" % (last_code_point, prev_cc))
1293 out_file.write("%04X..%04X:%d\n" %
1339 with open(os.path.join(path, "nfc.txt"), "w") as out_file:
1340 out_file.write(
1350 WriteAllCC(out_file)
1351 out_file.write("\n# Canonical decomposition mappings\n")
1362 out_file.write("%04X%s%s\n" % (start, separator, dm))
1367 with open(os.path.join(path, "nfkc.txt"), "w") as out_file:
1368 out_file.write(
1391 out_file.write("%04X>%s\n" % (start, dm))
1394 out_file.write("%04X>%s # NFC round-trip, NFKC one-way\n" %
1400 with open(os.path.join(path, "nfkc_cf.txt"), "w") as out_file:
1401 out_file.write(
1412 out_file.write("* Unicode " + _ucd_version + "\n\n")
1428 out_file.write("%04X>%s\n" % (prev_start, prev_nfkc_cf))
1430 out_file.write("%04X..%04X>%s\n" %
1475 with open(t, "w") as out_file:
1476 out_file.write("# Original file:\n")
1480 out_file.write(line)
1481 out_file.write(r"""
1500 out_file.write(line)
1521 out_file.write(line)
1523 out_file.write("FFFE..FFFF >FFFD\n");
1533 with open(s, "r") as in_file, open(t, "w") as out_file:
1554 out_file.write("%04X%s\n" % (first, first_data))
1556 out_file.write("%04X..%04X%s\n" % (first, last, first_data))
1562 out_file.write(line)
1563 out_file.write("\n")
1578 out_file.write(line)
1579 out_file.write("\n")
1583 out_file.write("%04X%s\n" % (first, first_data))
1585 out_file.write("%04X..%04X%s\n" % (first, last, first_data))
1589 out_file.flush()
2097 with open(out_path, "w") as out_file:
2098 out_file.write("""// © 2016 and later: Unicode, Inc. and others.
2123 out_file.write("#define UNICODE_VERSION { %s }\n\n" % ", ".join(version))
2131 out_file.write("static const Value VALUES_binprop[2] = {\n")
2132 out_file.write(' Value(0, "%s"),\n' % " ".join(_binary_values["N"]))
2133 out_file.write(' Value(1, "%s"),\n' % " ".join(_binary_values["Y"]))
2134 out_file.write("};\n\n")
2143 out_file.write("static const Value VALUES_%s[%d] = {\n" %
2152 out_file.write(' Value(%s%s, "%s"),\n' %
2154 out_file.write("};\n\n")
2158 out_file.write("static const Property PROPERTIES[%d] = {\n" %
2164 out_file.write(' Property(%s, "%s"),\n' % (enum, aliases))
2166 out_file.write(' Property(%s, "%s", VALUES_%s, %d),\n' %
2169 out_file.write(' Property(%s, "%s"),\n' % (enum, aliases))
2170 out_file.write("};\n\n")
2172 out_file.write("const int32_t MAX_ALIASES = %d;\n" % max_aliases)
2236 with codecs.open(ppucd_path, "w", "US-ASCII") as out_file:
2237 WritePreparsedUCD(out_file)
2238 out_file.flush()