ANN: Pymp3

Rainy sill at optonline.net
Sat May 19 17:53:23 CEST 2001


    Pymp3 - console python front-end for mpg123

http://silmarill.org/pymp3

    The Idea

I used mpg123 and was happy with it except for lack of three things: recursive loading, ability to easily switch to the next directory, and searching. For instance,  in pymp3 you can type dn and the first mp3 in next directory in list will play, or hit 'f', type in a search pattern and the first song matching that pattern will play.

    Requirements

You will need mpg123 and optional aumix for volume control. I tested it
with python2.1 on linux, but 2.0 will probably work, on windows it may work.

 Example session

        Pymp3 v0.2: 4 directories, 46 files loaded
    [type dl..]
Pymp3> directory list
        Directories:
1) family/anyway                         3) family/fearless
2) family/family entertainment           4) family/music in a doll's house
    [type s]
Pymp3> start
                    family/anyway 
         Playing:  1) Family - Good News Bad News
    [type dn]
Pymp3> directory next
            family/family entertainment 
         Playing:  1) Family - Hung Up Down
    [type mr]
Pymp3> mode Random
Random mode: [on]
Playing:  7) Family - Normans

It's my first relatively big script, so some of the code is fairly ugly.
If you have any advice on how to improve the design, please follow-up.
In particular, most functions in Pymp3 class don't return any values
and instead modify self.something variables - is this considered bad
design? Also, I have main() function inside of class, but usually it
goes into top level.

-- 
Jupiter and Saturn Oberon Miranda
And Titania Neptune Titan
Stars can frighten
- Syd



More information about the Python-list mailing list