import pygame.mixer pygame.mixer.init() if not pygame.mixer.music.getbusy(): pygame.mixer.music.load("dance.ogg") pygame.mixer.music.play