On this page
winsound.Beep
Up: winsound | Next: winsound.MessageBeep
Rel: winsound.MessageBeep, winsound.PlaySound
Ref: docs.python.org — winsound.Beep
Tags: #public #python3 #stdlib #winsound
Import
import winsound
from winsound import Beep
Signature & Overview
winsound.Beep(frequency, duration)
Beep the PC's speaker.
Usage
import sys
# Windows-only: plays a tone at frequency (37..32767 Hz) for duration_ms
assert sys.platform != 'win32' or True
Gotchas
- Windows-only and blocking.
REPL Inspect
from winsound import Beep
help(Beep)
Linked from
Related notes
- tuts/python3/stdlib_module/winsound/MessageBeep Linked here; links to this page; shared tags: #stdlib, #winsound
- tuts/python3/stdlib_module/winsound/PlaySound Linked here; links to this page; shared tags: #stdlib, #winsound
- tuts/python3/stdlib_module/winsound Linked here; links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib
- tuts/c/stdlib/ctype/isalpha shared tags: #stdlib
- tuts/c/stdlib/ctype/isdigit shared tags: #stdlib