def loadDictEdgeFromFile(cls, file, flagAsc=False): dict = {} listLineList = FileTool.ReadListLineListFromFile(file) for listLine in listLineList: if (flagAsc == False): edge = Edge.read_edge_from_list(listLine) else: edge = Edge.read_edge_asc_from_list(listLine) if (edge == None): continue ProcessTool.dictStrSetstr_add_str_str(dict, edge.start, edge.end) return dict
def loadDictUserFromFile(cls, file=""): InOut.console_func_begin("User loadDictUserFromFile") listLineList = FileTool.ReadListLineListFromFile(file) dict = {} for listLine in listLineList: user = User.read_user_from_list(listLine) if (user == None): continue dict[user.id] = user return dict