Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/wave.rst

    r2 r391  
    77.. Documentations stolen from comments in file.
    88
     9**Source code:** :source:`Lib/wave.py`
     10
     11--------------
     12
    913The :mod:`wave` module provides a convenient interface to the WAV sound format.
    1014It does not support compression/decompression, but it does support mono/stereo.
     
    1519.. function:: open(file[, mode])
    1620
    17    If *file* is a string, open the file by that name, other treat it as a seekable
    18    file-like object. *mode* can be any of
     21   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
    1923
    2024   ``'r'``, ``'rb'``
     
    2731
    2832   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.
    3241
    3342
     
    5362.. method:: Wave_read.close()
    5463
    55    Close the stream, and make the instance unusable. This is called automatically
    56    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.
    5766
    5867
     
    140149.. method:: Wave_write.close()
    141150
    142    Make sure *nframes* is correct, and close the file. This method is called upon
    143    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.
    144153
    145154
     
    193202   Write audio frames and make sure *nframes* is correct.
    194203
     204
    195205Note that it is invalid to set any parameters after calling :meth:`writeframes`
    196206or :meth:`writeframesraw`, and any attempt to do so will raise
Note: See TracChangeset for help on using the changeset viewer.