# -*- coding:UTF-8 -*-
#!/usr/bin/python

import os
import sys
import time

def myPlay1(sndName):
   # 調用系統默認播放器播放
   # 語速正常，缺點，彈出播放器窗口，可能點擊後反應比較慢

   os.system(sndName)

def myPlay2(sndName):
   # 沒有可以先安裝 pip install pygame
   import pygame

   pygame.mixer.init()
   track = pygame.mixer.music.load(sndName.encode())
   pygame.mixer.music.play()
   while True:
      if not pygame.mixer.music.get_busy():
         pygame.mixer.music.stop()
         break

def myPlay3(sndName):
   # playsound 播放
   # pip install playsound
   # 播放完，不會結束。

   import playsound
   playsound.playsound(sndName)

#myPlay1('vip.mp3')
myPlay2('vip.mp3')
#myPlay3('vip.mp3')
