GNU Info

Info Node: (python2.1-lib.info)wave

(python2.1-lib.info)wave


Next: chunk Prev: sunau Up: Multimedia Services
Enter node , (file) or (file)node

Read and write WAV files
========================

This manual section was written by Moshe Zadka
<moshez@zadka.site.co.il>.
Provide an interface to the WAV sound format.

The `wave' module provides a convenient interface to the WAV sound
format. It does not support compression/decompression, but it does
support mono/stereo.

The `wave' module defines the following function and exception:

`open(file[, mode])'
     If FILE is a string, open the file by that name, other treat it as
     a seekable file-like object. MODE can be any of
    ``'r'', `'rb'''
          Read only mode.

    ``'w'', `'wb'''
          Write only mode.

     Note that it does not allow read/write WAV files.

     A MODE of `'r'' or `'rb'' returns a `Wave_read' object, while a
     MODE of `'w'' or `'wb'' returns a `Wave_write' object.  If MODE is
     omitted and a file-like object is passed as FILE, `FILE.mode' is
     used as the default value for MODE (the `b' flag is still added if
     necessary).

`openfp(file, mode)'
     A synonym for `open()', maintained for backwards compatibility.

`Error'
     An error raised when something is impossible because it violates
     the WAV specification or hits an implementation deficiency.

Wave_read Objects
Wave_write Objects

automatically generated by info2www version 1.2.2.9