# play a wave sound on a windows box # python23 tested vegaseat 2/8/2005 import winsound import time # pick a wave file supplied by windows xp or one of your own ... # soundfile = "c:\\windows\\media\\chimes.wav" # python also accepts the forward slash soundfile = "c:/windows/media/chimes.wav" winsound.playsound(soundfile, winsound.snd_filename|winsound.snd_async) # wait one and a half seconds time.sleep(1.5) # play the system exit sound if set winsound.playsound("systemexit", winsound.snd_alias)
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....