import pygame
import time
#导入音乐文件
file = r'C:\1.wav'
pygame.mixer.init()
track = pygame.mixer.music.load(file)
pygame.mixer.music.play()
time.sleep(5)
pygame.mixer.music.stop()
转载于:https://www.cnblogs.com/theworld/p/10084537.html
import pygame
import time
#导入音乐文件
file = r'C:\1.wav'
pygame.mixer.init()
track = pygame.mixer.music.load(file)
pygame.mixer.music.play()
time.sleep(5)
pygame.mixer.music.stop()
转载于:https://www.cnblogs.com/theworld/p/10084537.html