コード例 #1
0
    def getCourseComment(self):
        courseCommentInfo = {}
        readFile = ReadFile()

        fileNamePaths = readFile.getFileName(self.fileDir)
        for fileNamePath in fileNamePaths:
            fileName = os.path.basename(fileNamePath).split(".")[0]
            comList = readFile.readFile(fileNamePath)
            courseCommentInfo.setdefault(fileName, comList)
        return courseCommentInfo
コード例 #2
0
    def getUserName(self):
        userInfo = {}
        filePath = ""

        readFile = ReadFile()
        nameList = readFile.readFile(filePath)

        db = DBconnect()
        dbc = db.dbConn()
        imageList = db.search(dbc)
        db.dbClose(dbc)

        for i in range(0, len(nameList)):
            userInfo.setdefault(nameList[0], imageList[0])

        return userInfo