Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Side by Side Diff: Doc/library/chunk.rst

Issue 18758: Fix internal references in the documentation
Patch Set: Created 6 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/calendar.rst ('k') | Doc/library/codecs.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`chunk` --- Read IFF chunked data 1 :mod:`chunk` --- Read IFF chunked data
2 ====================================== 2 ======================================
3 3
4 .. module:: chunk 4 .. module:: chunk
5 :synopsis: Module to read IFF chunks. 5 :synopsis: Module to read IFF chunks.
6 .. moduleauthor:: Sjoerd Mullender <sjoerd@acm.org> 6 .. moduleauthor:: Sjoerd Mullender <sjoerd@acm.org>
7 .. sectionauthor:: Sjoerd Mullender <sjoerd@acm.org> 7 .. sectionauthor:: Sjoerd Mullender <sjoerd@acm.org>
8 8
9 9
10 .. index:: 10 .. index::
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 the :class:`Chunk` class defined here is to instantiate an instance at the start 47 the :class:`Chunk` class defined here is to instantiate an instance at the start
48 of each chunk and read from the instance until it reaches the end, after which a 48 of each chunk and read from the instance until it reaches the end, after which a
49 new instance can be instantiated. At the end of the file, creating a new 49 new instance can be instantiated. At the end of the file, creating a new
50 instance will fail with a :exc:`EOFError` exception. 50 instance will fail with a :exc:`EOFError` exception.
51 51
52 52
53 .. class:: Chunk(file, align=True, bigendian=True, inclheader=False) 53 .. class:: Chunk(file, align=True, bigendian=True, inclheader=False)
54 54
55 Class which represents a chunk. The *file* argument is expected to be a 55 Class which represents a chunk. The *file* argument is expected to be a
56 file-like object. An instance of this class is specifically allowed. The 56 file-like object. An instance of this class is specifically allowed. The
57 only method that is needed is :meth:`read`. If the methods :meth:`seek` and 57 only method that is needed is :meth:`~io.IOBase.read`. If the methods :meth: `~io.IOBase.seek` and
58 :meth:`tell` are present and don't raise an exception, they are also used. 58 :meth:`~io.IOBase.tell` are present and don't raise an exception, they are al so used.
59 If these methods are present and raise an exception, they are expected to not 59 If these methods are present and raise an exception, they are expected to not
60 have altered the object. If the optional argument *align* is true, chunks 60 have altered the object. If the optional argument *align* is true, chunks
61 are assumed to be aligned on 2-byte boundaries. If *align* is false, no 61 are assumed to be aligned on 2-byte boundaries. If *align* is false, no
62 alignment is assumed. The default value is true. If the optional argument 62 alignment is assumed. The default value is true. If the optional argument
63 *bigendian* is false, the chunk size is assumed to be in little-endian order. 63 *bigendian* is false, the chunk size is assumed to be in little-endian order.
64 This is needed for WAVE audio files. The default value is true. If the 64 This is needed for WAVE audio files. The default value is true. If the
65 optional argument *inclheader* is true, the size given in the chunk header 65 optional argument *inclheader* is true, the size given in the chunk header
66 includes the size of the header. The default value is false. 66 includes the size of the header. The default value is false.
67 67
68 A :class:`Chunk` object supports the following methods: 68 A :class:`Chunk` object supports the following methods:
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 chunk will return ``''``. If you are not interested in the contents of 123 chunk will return ``''``. If you are not interested in the contents of
124 the chunk, this method should be called so that the file points to the 124 the chunk, this method should be called so that the file points to the
125 start of the next chunk. 125 start of the next chunk.
126 126
127 127
128 .. rubric:: Footnotes 128 .. rubric:: Footnotes
129 129
130 .. [#] "EA IFF 85" Standard for Interchange Format Files, Jerry Morrison, Electr onic 130 .. [#] "EA IFF 85" Standard for Interchange Format Files, Jerry Morrison, Electr onic
131 Arts, January 1985. 131 Arts, January 1985.
132 132
OLDNEW
« no previous file with comments | « Doc/library/calendar.rst ('k') | Doc/library/codecs.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+