Thanks for any reply!
It does not play them, it sends them over the network so that a program on a
user's machine may play them. Most decent mp3 players allow you to connect to
a streaming server (as they are called) and play the songs as they are
transferred. Gives an affect like listening to the radio.
Do you want to play the MP3 file on the server, like a jukebox. Or do
you want to stream MP3 files back to the client computer?
(Of course you can do both with Python)
Gerhard
If you mean an MP3 stream server written in Python, try edna
<http://edna.sf.net/>. It will serve MP3s in a stream to the client
computer. (NB: it's up to the client to "play" the MP3, often through
MIME associations in the browser.)
If you mean you want an MP3 player written in Python, well, I don't
suggest it. Processing MP3 data is very processor intensive and is
often thought best accomplished with a compiled C program. However,
cymbaline <http://www.silmarill.org/cymbaline/> is a Python frontend
to the (very pervasive) mpg123 MP3 player.
You don't mention which OS, so I should mention, this is from a linux
perspective. edna might very well work on Windows.
HTH
Tim Hammerquist
--
$ echo pizza > /dev/oven
Do you have examples, links, hints to doing each with python?
Thanks,
Tim
now, what shall I do? download a special application or use a special
proctor which some thing like http:// news://?
Thank you!
"Tim Hammerquist" <t...@vegeta.ath.cx> wrote in message
news:slrna7tdg...@vegeta.ath.cx...
Playing an MP3 file using pygame (http://www.pygame.org/):
import pygame.mixer as mixer
mixer.init(44100)
mixer.music.load("White Bird.mp3")
mixer.music.play()
mixer.music.get_busy()
print "Press enter to quit."
raw_input()
OTOH streaming MP3 files from the server to the client has IMHO little
to do with Python, it's more of a HTTP thing. As long as you've set the
correct content type and played the right tricks with HTML, it should
just work. FWIW, there's a streaming MP3 server written in Python at
Sourceforge: http://edna.sourceforge.net/
Gerhard
--
This sig powered by Python!
Außentemperatur in München: 4.0 °C Wind: 3.2 m/s