pygame is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

pygame / pygame http://pygame.org/

Clone this repository (size: 15.4 MB): HTTPS / SSH
hg clone https://bitbucket.org/pygame/pygame
hg clone ssh://hg@bitbucket.org/pygame/pygame

pygame / playmus.py

Branch
trackmod
import sys

import trackmod
trackmod.begin('playmus_rep.txt',
               ['pygame', 'pygame.mixer', 'pygame.mixer_music'], True)
import pygame

MusicEnd = pygame.USEREVENT

def main():
    pygame.mixer.init()
    pygame.mixer.music.set_endevent(MusicEnd)
    pygame.mixer.music.load(sys.argv[1])
    pygame.mixer.music.play()
    while pygame.mixer.music.get_busy():
        pygame.time.wait(100)
    pygame.mixer.quit()

if __name__ == '__main__':
    main()