Skip to main content
Help us improve Python packaging – donate today!

A simple interface for playing music from an MP3 file.

Project Description

Allows your Windows Python program to play and stop MP3s, without opening an external player or requiring any external programs. A very simple interface for the common case (playing an entire MP3), with an API for more complex tasks (e.g. playing from seconds 30 to 45 of an MP3).

Note: if you are looking for complex cross-platform audio control, try pyglet. After easy_installing pyglet, it requires a separate manual installation of AVlib libraries, which is why I wrote mp3play as an easy_installable alternative.


Play the first 30 seconds of a file:

import mp3play

filename = r'C:\Documents and Settings\Michael\Desktop\music.mp3'
clip = mp3play.load(filename)

import time
time.sleep(min(30, clip.seconds()))


Requires Windows XP at the moment, but the goal is to make a cross-platform module. Feel free to send patches to add Linux and Mac support! Note that the module’s purpose is to be easy_installable with no other work needed by the user, so things like AVLib are out unless that can be easy_installed automatically alongside mp3play.


Please let me know if you like or use this module - it would make my day!

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
mp3play-0.1.15-py2.5.egg (6.7 kB) Copy SHA256 hash SHA256 Egg 2.5 Aug 18, 2008 (10.3 kB) Copy SHA256 hash SHA256 Source None Aug 18, 2008

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page