代码拉取完成,页面将自动刷新
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@Project :py-music
@File :py-music.py
@Author :kehao
@Date :2021/8/1 22:10
"""
import collections
import json
import logging.config
import os
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1'
import sys
import yaml
from EventHandle import EventHandle
from Player import Player
if sys.version_info > (3, 9):
collections.Iterable = collections.abc.Iterable
if os.path.exists('logging.yml'):
with open('logging.yml', mode='rt', encoding='utf8') as f:
logging.config.dictConfig(yaml.safe_load(f.read()))
else:
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger()
if __name__ == '__main__':
with open('./data.json', mode='rt', encoding='utf8') as f:
data = json.load(f)
player = Player(data)
thread = EventHandle(1, "EventHandle-Thread", player)
thread.daemon = True
thread.start()
player.play()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。