Lines Matching refs:binary
95 writing raw bytes use binary mode and leave encoding unspecified.) The
105 'b' binary mode
110 The default mode is 'rt' (open for reading text). For binary random
115 Python distinguishes between files opened in binary and text modes,
117 binary mode (appending 'b' to the mode argument) return contents as
124 Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
136 for binary files.
144 be handled---this argument should not be used in binary mode. Pass
185 a file in a binary mode, the returned class varies: in read binary
186 mode, it returns a BufferedReader; in write binary and append binary
193 opened in a binary mode.
216 binary = "b" in modes
217 if text and binary:
218 raise ValueError("can't have text and binary mode at once")
223 if binary and encoding is not None:
224 raise ValueError("binary mode doesn't take an encoding argument")
225 if binary and errors is not None:
226 raise ValueError("binary mode doesn't take an errors argument")
227 if binary and newline is not None:
228 raise ValueError("binary mode doesn't take a newline argument")
229 if binary and buffering == 1:
231 warnings.warn("line buffering (buffering=1) isn't supported in binary "
259 if binary:
271 if binary:
345 The basic type used for binary data read from or written to a file is
546 The line terminator is always b'\n' for binary files; for text
625 """Base class for raw binary I/O."""
971 raise TypeError("can't write str to binary stream")
1264 raise TypeError("can't write str to binary stream")