Lines Matching +full:- +full:outfile
15 header = "/* Auto-generated by Programs/_freeze_module.py */"
18 def read_text(inpath: str) -> bytes:
23 def compile_and_marshal(name: str, text: bytes) -> bytes:
30 def get_varname(name: str, prefix: str) -> str:
34 def write_code(outfile, marshalled: bytes, varname: str) -> None: argument
37 outfile.write(f"const unsigned char {varname}[] = {{\n")
40 outfile.write(" ")
41 outfile.write(",".join(str(i) for i in marshalled[n : n + 16]))
42 outfile.write(",\n")
43 outfile.write("};\n")
46 def write_frozen(outpath: str, inpath: str, name: str, marshalled: bytes) -> None:
47 with open(outpath, "w") as outfile:
48 outfile.write(header)
49 outfile.write("\n")
51 write_code(outfile, marshalled, arrayname)