Originally Posted by
DirtDawg
First: is there anyway to produce a "beep" from a linux box in Python? I would like to use a sound as an alarm after a set amount of time, but the Docs say nothing about a "beep" function. I did find a few modules concerning sound (sndhdr, I think was one. A couple others), but after experimenting with a few files, screwing them up bigtime in the process, I realized I had no idea how to utilize those tools whatsoever.
I'm not sure if this is the kind of beep that you want, but this is what I use. Maybe your're looking for something that sounds nicer for the alarm.
example
Code:
#!/usr/bin/python
print "Game Over"
print "\a"
raw_input("\n\nPress the enter key to exit.")
Bookmarks