1
0
mirror of https://gitee.com/coder-xiaomo/gitee2github synced 2025-09-11 14:31:40 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

单一py文件拆分为py文件模块,功能完成

This commit is contained in:
2022-03-17 01:16:26 +08:00
parent 91268f3bba
commit 876936e036
12 changed files with 685 additions and 377 deletions

13
assets/common.py Normal file
View File

@@ -0,0 +1,13 @@
import os
import json
def saveJSON(data, filename):
with open(filename, 'w', encoding='utf-8') as f:
json.dump(data, f, ensure_ascii=False, indent=4)
def readJSON(filename):
with open(filename, 'r', encoding='utf-8') as f:
return json.load(f)
def fileExists(filename):
return os.path.exists(filename)