Playing mp3 files with wxPython

Pete Shinners pete at
Fri Sep 7 06:42:57 CEST 2001

<ibwonrr at> wrote in
> Any advice on playing mp3 files or mp3 dlls would be greatly
> appreciated.

pygame can stream mp3 audio. although i'll admit the decoding
done by the SMPEG library doesn't work on all the mp3s out
there. but as long as its nice basic mp3, there's a good chance
it will fly for you :]

you can use pygame's audio without bringing in all the other
bells and whistles it has. the code would resemble this..

import pygame.mixer as mixer

after that you can make a call to "" to
see if it is still playing. streaming and decoding all happens
in a background thread.

it's totally free to use, but i admit the mp3 support isn't
100%. other formats like OGG, MOD, WAV, have no trouble, if
that would be better for you :]

More information about the Python-list mailing list