app.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:FitScan 作者: GunfighterJ 项目源码 文件源码
def getItemSlotMapping(self):
        qfile = QtCore.QFile(":db/slotMap.csv")
        items = {}
        if qfile.open(QtCore.QIODevice.ReadOnly | QtCore.QIODevice.Text):
            data = qfile.readAll()
            content = StringIO.StringIO(data)
            reader = csv.reader(content, delimiter=',')

            for row in reader:
                items[row[0].decode('utf-8')] = row[1].decode('utf-8')
            return items

        QMessageBox.critical(None, 'Database Failure', 'Failed to read item mappings from database', QMessageBox.Ok)
        self.stop()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号