Python and MP3

Rod Stephenson viking_kiwi at yahoo.poofters.com
Wed Jun 23 21:49:50 EDT 2004


O-Zone <o-zone at zerozone.it> writes:

> Hi all,
> i'm looking for an MP3 player/library in Python/wxPython to use in a
> multiplatform program. Someone can help me ?
> 

It might be worth mentioning the snack sound library for Tcl,
(though the orginator of this thread is after something for
 wxPython)

http://www.speech.kth.se/snack/index.html


Tcl is built into Python via Tkinter, but many packages are not
available. You will need to install Tcl separately - I use the
Active State installation here.

You can then copy  missing packages to the tcl
subdirectory. In the Active State installation they are under
the lib subdirectory. Copy the Snack2.2 folder from there to
the Python23/tcl directory.

Then:

from Tkinter import *
root=Tk()

snackScript = '''package require -exact sound 2.2;
snack::sound s -file "chaconne.mp3";
s play -block 1
'''

root.tk.eval(snackScript)


Snack has a lot of useful tools for visualization and synthesis.


On the subject of Tcl generally, is there some way of telling
Python to use my native Tcl installation rather than the
stripped down one that comes with the Python installation -
then these additional libraries would be generally available.






-- 
Bruce Rule 1. 



More information about the Python-list mailing list