Lines Matching refs:out_file
1136 def WriteFieldsRangeProps(fields, start, end, props, out_file): argument
1139 out_file.write(";".join(fields))
1140 out_file.write("\n")
1159 def WritePreparsedUCD(out_file): argument
1160 out_file.write("""# Preparsed UCD generated by ICU preparseucd.py
1164 out_file.write("ucd;%s\n\n" % _ucd_version)
1170 out_file.write(";".join(["property", prop[0]] + prop[1]))
1171 out_file.write("\n")
1172 out_file.write("\n")
1173 out_file.write(";".join(["binary"] + _binary_values["N"]))
1174 out_file.write("\n")
1175 out_file.write(";".join(["binary"] + _binary_values["Y"]))
1176 out_file.write("\n")
1182 out_file.write(";".join(["value", prop[1][0]] + prop[3][name]))
1183 out_file.write("\n")
1184 out_file.write("\n")
1194 WriteFieldsRangeProps(["defaults"], 0, 0x10ffff, _defaults, out_file)
1207 WriteFieldsRangeProps(["\nblock"], b[0], b_end, b[2], out_file)
1212 out_file.write("# %04lX..%04lX %s\n" % (h[0], h[1], EscapeNonASCII(h[2])))
1220 out_file.write(";".join(fields))
1221 out_file.write("\n")
1225 out_file.write("# %s\n" % EscapeNonASCII(_h2[i_h2][1]))
1234 out_file.write("\n# No block\n")
1242 WriteFieldsRangeProps([line_type], start, end, props, out_file)
1247 def WriteAllCC(out_file): argument
1248 out_file.write("# Canonical_Combining_Class (ccc) values\n");
1260 out_file.write("%04X:%d\n" % (last_code_point, prev_cc))
1262 out_file.write("%04X..%04X:%d\n" %
1308 with open(os.path.join(path, "nfc.txt"), "w") as out_file:
1309 out_file.write(
1319 WriteAllCC(out_file)
1320 out_file.write("\n# Canonical decomposition mappings\n")
1331 out_file.write("%04X%s%s\n" % (start, separator, dm))
1336 with open(os.path.join(path, "nfkc.txt"), "w") as out_file:
1337 out_file.write(
1360 out_file.write("%04X>%s\n" % (start, dm))
1363 out_file.write("%04X>%s # NFC round-trip, NFKC one-way\n" %
1369 with open(os.path.join(path, "nfkc_cf.txt"), "w") as out_file:
1370 out_file.write(
1381 out_file.write("* Unicode " + _ucd_version + "\n\n")
1397 out_file.write("%04X>%s\n" % (prev_start, prev_nfkc_cf))
1399 out_file.write("%04X..%04X>%s\n" %
1444 with open(t, "w") as out_file:
1445 out_file.write("# Original file:\n")
1449 out_file.write(line)
1450 out_file.write(r"""
1469 out_file.write(line)
1490 out_file.write(line)
1492 out_file.write("FFFE..FFFF >FFFD\n");
1502 with open(s, "r") as in_file, open(t, "w") as out_file:
1523 out_file.write("%04X%s\n" % (first, first_data))
1525 out_file.write("%04X..%04X%s\n" % (first, last, first_data))
1531 out_file.write(line)
1532 out_file.write("\n")
1547 out_file.write(line)
1548 out_file.write("\n")
1552 out_file.write("%04X%s\n" % (first, first_data))
1554 out_file.write("%04X..%04X%s\n" % (first, last, first_data))
1558 out_file.flush()
2064 with open(out_path, "w") as out_file:
2065 out_file.write("""// © 2016 and later: Unicode, Inc. and others.
2090 out_file.write("#define UNICODE_VERSION { %s }\n\n" % ", ".join(version))
2098 out_file.write("static const Value VALUES_binprop[2] = {\n")
2099 out_file.write(' Value(0, "%s"),\n' % " ".join(_binary_values["N"]))
2100 out_file.write(' Value(1, "%s"),\n' % " ".join(_binary_values["Y"]))
2101 out_file.write("};\n\n")
2110 out_file.write("static const Value VALUES_%s[%d] = {\n" %
2119 out_file.write(' Value(%s%s, "%s"),\n' %
2121 out_file.write("};\n\n")
2125 out_file.write("static const Property PROPERTIES[%d] = {\n" %
2131 out_file.write(' Property(%s, "%s"),\n' % (enum, aliases))
2133 out_file.write(' Property(%s, "%s", VALUES_%s, %d),\n' %
2136 out_file.write(' Property(%s, "%s"),\n' % (enum, aliases))
2137 out_file.write("};\n\n")
2139 out_file.write("const int32_t MAX_ALIASES = %d;\n" % max_aliases)
2203 with codecs.open(ppucd_path, "w", "US-ASCII") as out_file:
2204 WritePreparsedUCD(out_file)
2205 out_file.flush()