예제 #1
0
def changeGameVersion(version, jsonPath):
    di = json.loads(readFile(jsonPath))
    pppp = di['version'].split(".")
    pppp[2] = version
    di['version'] = '.'.join(pppp)
    writeToFile(jsonPath, json.dumps(di, indent=2))
    print "change game_verison.json to ", version
예제 #2
0
def handleplatformjson(chan, fPath, isTV):
    obj = json.loads(readFile(fPath))
    obj['platform_name'] = chan
    obj['isTV'] = isTV
    """
		1 : facebook
		2 : wx
	"""
    obj['share_type'] = 2
    """
		1: 简体中文
		2: 英文
	"""
    obj['lang'] = 1
    """
		是否显示JS错误
	"""
    obj['showError'] = False
    """
	platform_type 目前没用到
	"""

    writeToFile(fPath, json.dumps(obj, indent=2))
예제 #3
0
	def encodeDataAndSave(self,path):
		writeToFile(path, self.encodeData(readFile(path,"rb")))