__init__.py 文件源码

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

项目:BigBrotherBot-For-UrT43 作者: ptitbigorneau 项目源码 文件源码
def insert(self):
        """
        Insert the current B3 instance in the database.
        Will also store the B3 instance reference in the QApplication.
        """
        # store it in the database first so we get the id
        cursor = B3App.Instance().storage.cursor()
        cursor.execute("INSERT INTO b3 (config) VALUES (?)", (self.config_path,))
        self.id = cursor.lastrowid
        LOG.debug('stored new process in the database: @%s:%s', self.id, self.config_path)
        cursor.close()
        # store in the QApplication
        if self not in B3App.Instance().processes:
            bisect.insort_left(B3App.Instance().processes, self)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号