一位朋友让我创建并编译为exe,以便他粘贴在他父亲计算机的启动文件夹中。为什么哦为什么pygame不播放声音?它只是在我的笔记本电脑和台式机上使我的 python 崩溃: import easygui as eg import pygame pygame.init pygame.mixer.init()
def sound():
pygame.mixer.init()
pygame.mixer.music.load('scream.mp3')
pygame.mixer.music.play(0)
def prg():
img="scary.gif"
choices=["Turn Off Scream","Turn scream off"]
msg="LAUGHING QUITE LOUDLY"
title="LQLLQLLQLLQLLQLLQLLQLLQL"
reply=eg.buttonbox(msg,title,image=img,choices=choices)
if reply=="Turn Off Scream":
lql()
elif reply=="Turn scream off":
lql()
def lql():
prg()
while 1:
sound()
prg()