Lines Matching defs:write

186     mode, it returns a BufferedReader; in write binary and append binary
187 modes, it returns a BufferedWriter, and in read/write mode, it returns
220 raise ValueError("can't have read/write/append mode at once")
222 raise ValueError("must have exactly one of read/write/append mode")
339 Even though IOBase does not declare read or write because
360 fp.write('Spam and eggs!')
403 """Flush write buffers, if applicable.
482 If False, write() and truncate() will raise OSError.
618 self.write(line)
676 def write(self, b):
682 self._unsupported("write")
697 In addition, read(), readinto() and write() may raise
772 def write(self, b):
781 self._unsupported("write")
801 write().
967 def write(self, b):
969 raise ValueError("write to closed file")
971 raise TypeError("can't write str to binary stream")
979 # and the new write position.
1262 def write(self, b):
1264 raise TypeError("can't write str to binary stream")
1267 raise ValueError("write to closed file")
1283 # write and cut back our buffer.
1306 n = self.raw.write(self._write_buf)
1313 "write could not complete without blocking", 0)
1315 raise OSError("write() returned incorrect number of bytes")
1349 form a sequential IO object that can read and write. This is typically
1382 def write(self, b):
1383 return self.writer.write(b)
1482 def write(self, b):
1488 return BufferedWriter.write(self, b)
1535 raise ValueError('Must have exactly one of create/read/write/append '
1609 # first write()).
1712 def write(self, b):
1717 returns None if the write would block.
1722 return os.write(self._fd, b)
1793 """True if file was opened in a write mode."""
1852 def write(self, s):
1854 self._unsupported("write")
2007 write contains a newline character.
2075 # don't write a BOM in the middle of a file
2210 def write(self, s):
2213 raise ValueError("write to closed file")
2215 raise TypeError("can't write %s to text stream" %
2224 self.buffer.write(b)
2681 self.write(initial_value)