feat: dzgui 7 alpha

This commit is contained in:
aclist committed 2025-12-08 17:32:25 +09:00
1 parent 1acdbd58c5
commit 2e5b771137
150 files changed
+10359

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import json
from pathlib import Path
def read_json(path: Path) -> dict:
try:
with open(path, "r") as infile:
try:
data = json.load(infile)
except json.decoder.JSONDecodeError as e:
raise e
except OSError as e:
raise e
return data
def write_json(data: dict, path: Path) -> None:
try:
j = json.dumps(data, indent=2)
except Exception as e:
raise e
# TODO: Path.write_text()
try:
with open(path, "w") as outfile:
outfile.write(j)
except OSError as e:
raise e