cpython/Lib/test/test_winsound.py

19 lines
551 B
Python
Raw Normal View History

# Ridiculously simple test of the winsound module for Windows.
2000-04-21 18:28:47 -03:00
2003-04-09 16:57:06 -03:00
import winsound, time
2000-04-21 18:28:47 -03:00
for i in range(100, 2000, 100):
winsound.Beep(i, 75)
print "Hopefully you heard some sounds increasing in frequency!"
2003-04-09 16:57:06 -03:00
winsound.MessageBeep()
time.sleep(0.5)
winsound.MessageBeep(winsound.MB_OK)
time.sleep(0.5)
winsound.MessageBeep(winsound.MB_ICONASTERISK)
time.sleep(0.5)
winsound.MessageBeep(winsound.MB_ICONEXCLAMATION)
time.sleep(0.5)
winsound.MessageBeep(winsound.MB_ICONHAND)
time.sleep(0.5)
winsound.MessageBeep(winsound.MB_ICONQUESTION)
time.sleep(0.5)