Movatterモバイル変換


[0]ホーム

URL:


Previous PageUp One LevelNext PagePython Library ReferenceContentsModule IndexIndex
Previous:14.4.2 AU_write ObjectsUp:14. Multimedia ServicesNext:14.5.1 Wave_read Objects

14.5wave -- Read and write WAV files

Thewave module provides a convenient interface to the WAV soundformat. It does not support compression/decompression, but it does supportmono/stereo.

Thewave module defines the following function and exception:

open(file[, mode])
Iffile is a string, open the file by that name, other treat itas 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.

Amode of'r' or'rb' returns aWave_readobject, while amode of'w' or'wb' returnsaWave_write object. Ifmode is omitted and a file-like object is passed asfile,file.mode is used as thedefault value formode (the "b" flag is still added if necessary).

openfp(file, mode)
A synonym foropen(), maintained for backwards compatibility.

exceptionError
An error raised when something is impossible because it violates theWAV specification or hits an implementation deficiency.


Subsections


Previous PageUp One LevelNext PagePython Library ReferenceContentsModule IndexIndex
Previous:14.4.2 AU_write ObjectsUp:14. Multimedia ServicesNext:14.5.1 Wave_read Objects
Release 2.2.3, documentation updated on 30 May 2003.
SeeAbout this document... for information on suggesting changes.
[8]ページ先頭

©2009-2026 Movatter.jp