live_mame_processing.py 文件源码

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

项目:cps2-gfx-editor 作者: goosechooser 项目源码 文件源码
def main(p, folder):
    save_ = BASE_PATH + folder
    while p.poll() is None:
        result = await process_frame()
        if result:
            file_name = 'frame_' + str(result[0]) + '.txt'
            with open(save_ + file_name, 'w') as f:
                for res in result[1]:
                    f.write(jsonpickle.encode(res) + "\n")

    remaining = Q.qsize()
    print(str(remaining) + " frames left")

    for i in range(remaining):
        result = await process_frame()
        if result:
            print(str(Q.qsize()) + " left in the queue")
            file_name = 'frame_' + str(result[0]) + '.txt'
            with open(save_ + file_name, 'w') as f:
                for res in result[1]:
                    f.write(jsonpickle.encode(res) + "\n")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号