On this page
  1. winsound.PlaySound
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

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

REPL Inspect

from winsound import PlaySound
help(PlaySound)

Linked from

Related notes