mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
Add test for MessageBeep()
This commit is contained in:
parent
f405064ccb
commit
11d204ca27
1 changed files with 13 additions and 1 deletions
|
@ -1,6 +1,18 @@
|
||||||
# Ridiculously simple test of the winsound module for Windows.
|
# Ridiculously simple test of the winsound module for Windows.
|
||||||
|
|
||||||
import winsound
|
import winsound, time
|
||||||
for i in range(100, 2000, 100):
|
for i in range(100, 2000, 100):
|
||||||
winsound.Beep(i, 75)
|
winsound.Beep(i, 75)
|
||||||
print "Hopefully you heard some sounds increasing in frequency!"
|
print "Hopefully you heard some sounds increasing in frequency!"
|
||||||
|
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)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue