We use pyglet to play an mp3-file – this is a very simple example.
The player has no controls – I just wanted to make a point and play a Music-File from the Shell
We need AVBin installed on the computer to decode the MP3-File
#! A very simple Music player
# Pyglet handles the playing of the audio files
# we need AVBin to decode the mp3 file
# otherwise we get an error
import pyglet
music = pyglet.resource.media('music.mp3') # get the media file
music.play()
pyglet.app.run()