aifc.open(file, mode=None)
Open an AIFF or AIFF-C file and return an object instance with methods that are described below. The argument file is either a string naming a file or a file object. mode must be 'r'
or 'rb'
when the file must be opened for reading, or 'w'
or 'wb'
when the file must be opened for writing. If omitted, file.mode
is used if it exists, otherwise 'rb'
is used. When used for writing, the file object should be seekable, unless you know ahead of time how many samples you are going to write in total and use writeframesraw()
and setnframes()
. The open()
function may be used in a with
statement. When the with
block completes, the close()
method is called.
Changed in version 3.4: Support for the with
statement was added.
Please login to continue.