On this page
  1. wave.Wave_write
  2. Import
  3. Signature & Overview
  4. Methods & Attributes
  5. Usage
  6. Gotchas
  7. REPL Inspect

wave.Wave_write

Prev: wave.Wave_read | Up: wave
Rel: wave.Error, wave.open, wave.Wave_read
Ref: docs.python.org — wave.Wave_write
Tags: #public #python3 #stdlib #wave


Import

import wave
from wave import Wave_write

Signature & Overview

wave.Wave_write(f)

Variables used in this class: These variables are user settable through appropriate methods of this class:

Methods & Attributes

Usage

import io, wave

buf = io.BytesIO()
with wave.open(buf, 'wb') as wf:
    assert isinstance(wf, wave.Wave_write)
    wf.setnchannels(1); wf.setsampwidth(2); wf.setframerate(8000)
    wf.writeframes(b'\x00\x00')

Gotchas

REPL Inspect

from wave import Wave_write
help(Wave_write)

Linked from

Related notes