[Tutor] Sounds [pygame]
Danny Yoo
dyoo@hkn.eecs.berkeley.edu
Sun Oct 27 16:40:01 2002
On Sun, 27 Oct 2002, Kyle Babich wrote:
> Dumb question, how do I play a sound (wav, wma, or mp3) or display an
> image (gif, bmp, jpg, jpeg) from the command line?
Hi Kyle; it's nice to hear from you again!
We can handle the sound and image part with the Pygame module:
http://pygame.org/
http://pygame.org/docs/ref/Sound.html
I think pygame can handle mp3 and wav's, but I'm not so sure about wma's.
For that, you probably need to do something Windows-specific. Try asking
on the python-win32 list, and I'm sure someone there might know how to get
wma files to play.
http://mail.python.org/mailman/listinfo/python-win32
For the image part, you can probably yank out components of Pygame's
'chimp' tutorial:
http://www.pygame.org/docs/tut/ChimpLineByLine.html
replace the 'chimp' image loading with your own image.
I hope this helps!