beeping noise on windows
Jason Orendorff
jason at jorendorff.com
Mon Jan 28 10:12:35 EST 2002
> back on my Apple II+ i could write the line
> "print Ctrl-G"
> and the computer would beep. Is there a command as simple to make windows
> beep for me? -- from python?
http://www.python.org/doc/1.5.2p2/lib/module-winsound.html
import winsound
winsound.PlaySound(".Default", winsound.SND_ALIAS | winsound.SND_ASYNC)
Other sounds are available:
"SystemAsterisk"
"SystemExclamation"
"SystemQuestion"
"MailBeep"
...
There's a list in your registry somewhere; search for SystemAsterisk.
Use SND_FILENAME instead of SND_ALIAS if you want to specify which
WAV file to play.
## Jason Orendorff http://www.jorendorff.com/
More information about the Python-list
mailing list