Lines Matching refs:buffering
43 def open(file, mode="r", buffering=-1,
90 buffering is an optional integer used to set the buffering policy.
91 Pass 0 to switch buffering off (only allowed in binary mode), 1 to select
92 line buffering (only usable in text mode), and an integer > 1 to indicate
93 the size of a fixed-size chunk buffer. When no buffering argument is
94 given, the default buffering policy works as follows:
102 use line buffering. Other text files use the policy described above
158 if not isinstance(buffering, (int, long)):
159 raise TypeError("invalid buffering: %r" % buffering)
196 if buffering == 1 or buffering < 0 and raw.isatty():
197 buffering = -1
199 if buffering < 0:
200 buffering = DEFAULT_BUFFER_SIZE
207 buffering = bs
208 if buffering < 0:
209 raise ValueError("invalid buffering size")
210 if buffering == 0:
215 buffer = BufferedRandom(raw, buffering)
217 buffer = BufferedWriter(raw, buffering)
219 buffer = BufferedReader(raw, buffering)
234 "open(file, mode='r', buffering=-1, encoding=None, "