예제 #1
0
파일: Edge.py 프로젝트: AlgoSkyNet/HLGPS
 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
예제 #2
0
    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