Beep the PC's speaker.
The frequency parameter specifies frequency, in hertz, of the
sound, and must be in the range 37 through 32,767.
The duration parameter specifies the number of milliseconds the
sound should last. If the system is not
able to beep the speaker, RuntimeError is raised.
Under Windows 95 and 98, the Windows Beep()
function exists but is useless (it ignores its arguments). In that
case Python simulates it via direct port manipulation (added in version
2.1). It's unknown whether that will work on all systems.New in version 1.6.
Call the underlying PlaySound() function from the
Platform API. The sound parameter may be a filename, audio
data as a string, or None. Its interpretation depends on the
value of flags, which can be a bit-wise ORed combination of
the constants described below. If the system indicates an error,
RuntimeError is raised.
The sound parameter is a sound association name from the
registry. If the registry contains no such name, play the system
default sound unless SND_NODEFAULT is also specified.
If no default sound is registered, raise RuntimeError.
Do not use with SND_FILENAME.
All Win32 systems support at least the following; most systems support
Corresponding Control Panel Sound name
# Play Windows exit sound.
# Probably play Windows default sound, if any is registered (because
# "*" probably isn't the registered name of any sound).