Lines Matching +defs:makefile +defs:mode
205 errorTab[11029] = "Invalid QoS shape discard mode object."
216 """A subclass of _socket.socket adding the makefile() method."""
298 # mode to override platform-specific socket flags inheritance.
303 def makefile(self, mode="r", buffering=None, *,
305 """makefile(...) -> an I/O stream connected to the socket
308 supported mode values are 'r' (default), 'w' and 'b'.
311 if not set(mode) <= {"r", "w", "b"}:
312 raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,))
313 writing = "w" in mode
314 reading = "r" in mode or not writing
316 binary = "b" in mode
343 text.mode = mode
454 if 'b' not in getattr(file, 'mode', 'b'):
455 raise ValueError("file should be opened in binary mode")
472 *file* must be a regular file object opened in binary mode.
667 This class supports the makefile() method on sockets. It provides
680 def __init__(self, sock, mode):
681 if mode not in ("r", "w", "rw", "rb", "wb", "rwb"):
682 raise ValueError("invalid mode: %r" % mode)
685 if "b" not in mode:
686 mode += "b"
687 self._mode = mode
688 self._reading = "r" in mode
689 self._writing = "w" in mode
766 def mode(self):