def saveTasksJsonFile(ts_code, tasks_arr): filepath = tmc.get_json_path() tasks_dic = {} if os.path.exists(filepath): tasks_dic = readJsonFile(filepath) tasks_dic[ts_code] = tasks_arr saveJsonFile(filepath, tasks_dic)
def readTaskJsonFile(ts_code): path = tmc.get_json_path() task_dic = readJsonFile(path) tasks = task_dic[ts_code] return tasks