| | |
| | | import binascii
|
| | | import GameWorld
|
| | | import traceback
|
| | | import shutil
|
| | | import zlib
|
| | | import json
|
| | | #---------------------------------------------------------------------
|
| | | #全局变量
|
| | |
|
| | |
| | |
|
| | | return data
|
| | |
|
| | | def DelFolder(path, makeDir=False):
|
| | | ## 删除文件夹
|
| | | if os.path.exists(path):
|
| | | # 删除整个目录(包括自身)
|
| | | shutil.rmtree(path)
|
| | | if makeDir:
|
| | | # 重新创建空目录(保留原目录名)
|
| | | os.makedirs(path)
|
| | | return
|
| | |
|
| | | #提示除零错误的EVAL
|
| | | ##
|
| | | # @param 参数
|
| | |
| | | except ZeroDivisionError:
|
| | | return "Division is Zero"
|
| | |
|
| | | def JsonDump(dumpObj):
|
| | | return json.dumps(dumpObj, ensure_ascii=False)
|
| | |
|
| | | ##生成指定文件(如par:r'E:\开发版本\Data\logo\formName1.log')
|
| | | #def MakeAppointFile(par):
|
| | | # dir = os.path.dirname(par) # 获得文件目录
|