相关配置:
Anaconda 4.2.0 (64-bit)
Python 3.5.2
程序:
import sys
import pygame
pygame.init()
pygame.mixer.init()
print("播放音乐")
path = r"jj.mp3"
path1 = r"tu1.jpg"
path2 = r"ts.mp3"
path3 = r"tu2.jpg"
path4 = r'tu.jpg'
path5 = r'xg.mp3'
screen = pygame.display.set_mode([921, 576])
icon = pygame.image.load(path1).convert_alpha()
pygame.display.set_icon(icon)
background = pygame.image.load(path1).convert_alpha()
background1 = pygame.image.load(path3).convert_alpha()
background2 = pygame.image.load(path4).convert_alpha()
pygame.display.set_caption('音乐盒')
pygame.time.delay(1000)
while 1:
for event in pygame.event.get():
if