We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e11529 commit fa52af4Copy full SHA for fa52af4
Tools/scripts/deepfreeze.py
@@ -403,14 +403,14 @@ def main() -> None:
403
global verbose
404
args = parser.parse_args()
405
verbose = args.verbose
406
- with open(args.file) as f:
+ with open(args.file, encoding="utf-8") as f:
407
source = f.read()
408
modname = args.module or os.path.basename(args.file).removesuffix(".py")
409
output = args.output or modname + ".c"
410
outdir = os.path.dirname(output)
411
if outdir:
412
os.makedirs(outdir, exist_ok=True)
413
- with open(output, "w") as file:
+ with open(output, "w", encoding="utf-8") as file:
414
with report_time("generate"):
415
generate(source, f"<frozen {modname}>", modname, file)
416
if verbose:
0 commit comments