Python Language Playing Windows' beeps


Example

Windows provides an explicit interface through which the winsound module allows you to play raw beeps at a given frequency and duration.

import winsound
freq = 2500 # Set frequency To 2500 Hertz
dur = 1000 # Set duration To 1000 ms == 1 second
winsound.Beep(freq, dur)