mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-21 11:15:36 -05:00
committed by
GitHub
parent
f6d5cf06c8
commit
5bed5ede52
@@ -21,7 +21,7 @@ const write = (base, literal) => {
|
||||
python.push(`_path = _Path("${base}/${key}")`);
|
||||
if (typeof value === "string") {
|
||||
const code = JSON.stringify(value);
|
||||
python.push(`_path.write_text(${code})`);
|
||||
python.push(`_path.write_text(${code},encoding="utf-8")`);
|
||||
} else {
|
||||
// @see https://github.com/pyscript/pyscript/pull/1813#issuecomment-1781502909
|
||||
python.push(`if not _os.path.exists("${base}/${key}"):`);
|
||||
|
||||
Reference in New Issue
Block a user