On this page
winsound.PlaySound
Prev: winsound.MessageBeep | Up: winsound
Rel: winsound.Beep, winsound.MessageBeep
Ref: docs.python.org — winsound.PlaySound
Tags: #public #python3 #stdlib #winsound
Import
import winsound
from winsound import PlaySound
Signature & Overview
winsound.PlaySound(sound, flags)
Call the underlying PlaySound function from the Platform API.
Usage
import sys
# Windows-only: plays WAV files or system sound aliases (combine SND_ASYNC to avoid blocking)
assert sys.platform != 'win32' or True
Gotchas
- Windows-only and uncompressed WAV only.
REPL Inspect
from winsound import PlaySound
help(PlaySound)
Linked from
Related notes
- tuts/python3/stdlib_module/winsound/Beep Linked here; links to this page; shared tags: #stdlib, #winsound
- tuts/python3/stdlib_module/winsound/MessageBeep 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