Changeset 391 for python/trunk/Doc/library/wave.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/wave.rst
r2 r391 7 7 .. Documentations stolen from comments in file. 8 8 9 **Source code:** :source:`Lib/wave.py` 10 11 -------------- 12 9 13 The :mod:`wave` module provides a convenient interface to the WAV sound format. 10 14 It does not support compression/decompression, but it does support mono/stereo. … … 15 19 .. function:: open(file[, mode]) 16 20 17 If *file* is a string, open the file by that name, other treat it as a seekable18 file-like object.*mode* can be any of21 If *file* is a string, open the file by that name, otherwise treat it as a 22 seekable file-like object. *mode* can be any of 19 23 20 24 ``'r'``, ``'rb'`` … … 27 31 28 32 A *mode* of ``'r'`` or ``'rb'`` returns a :class:`Wave_read` object, while a 29 *mode* of ``'w'`` or ``'wb'`` returns a :class:`Wave_write` object. If *mode* 30 is omitted and a file-like object is passed as *file*, ``file.mode`` is used as 31 the default value for *mode* (the ``'b'`` flag is still added if necessary). 33 *mode* of ``'w'`` or ``'wb'`` returns a :class:`Wave_write` object. If 34 *mode* is omitted and a file-like object is passed as *file*, ``file.mode`` 35 is used as the default value for *mode* (the ``'b'`` flag is still added if 36 necessary). 37 38 If you pass in a file-like object, the wave object will not close it when its 39 :meth:`close` method is called; it is the caller's responsibility to close 40 the file object. 32 41 33 42 … … 53 62 .. method:: Wave_read.close() 54 63 55 Close the stream , and make the instance unusable. This is called automatically56 on object collection.64 Close the stream if it was opened by :mod:`wave`, and make the instance 65 unusable. This is called automatically on object collection. 57 66 58 67 … … 140 149 .. method:: Wave_write.close() 141 150 142 Make sure *nframes* is correct, and close the file . This method is called upon143 deletion.151 Make sure *nframes* is correct, and close the file if it was opened by 152 :mod:`wave`. This method is called upon object collection. 144 153 145 154 … … 193 202 Write audio frames and make sure *nframes* is correct. 194 203 204 195 205 Note that it is invalid to set any parameters after calling :meth:`writeframes` 196 206 or :meth:`writeframesraw`, and any attempt to do so will raise
Note:
See TracChangeset
for help on using the changeset viewer.