3
Contributors
3
Replies
19
Views
2 Years
Discussion Span
Last Post by sneekula
Featured Replies
  • 1

    https://code.google.com/p/pyglet/ Appears they didn't pay the bill for pyglet.org Read More

  • 2

    Windows binaries are also still available at: http://www.lfd.uci.edu/~gohlke/pythonlibs/ Pyglet uses AVbin for sound, so you could check that: http://avbin.github.io/AVbin/Home/Home.html Read More

  • Thanks, I got it to go! ''' pyg_Sound1.py playing sound files using pyglet download and install pyglet-1.2alpha1.win32-py2.7.exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/ avbin.dll is included so pyglet can play .wav .mp3 .ogg sound files (but not .mid Midi files) ''' import pyglet # pick a sound file you have, or one of those … Read More

2

Thanks, I got it to go!

''' pyg_Sound1.py
playing sound files using pyglet
download and install
pyglet-1.2alpha1.win32-py2.7.exe
from
http://www.lfd.uci.edu/~gohlke/pythonlibs/

avbin.dll is included
so pyglet can play .wav  .mp3  .ogg sound files
(but not .mid Midi files)
'''

import pyglet

# pick a sound file you have, or one of those below
# in this case file names are case sensitive
#sound_file = 'drums.ogg'
#sound_file = 'cool_f.wav'
sound_file = 'Boing.mp3'

music = pyglet.media.load(sound_file)
music.play()

pyglet.app.run()
This question has already been answered. Start a new discussion instead.
Be sure to adhere to our posting rules.