Lines Matching refs:closed

85     wrapped. (If a file descriptor is given, it is closed when the
86 returned I/O object is closed, unless closefd is set to False.)
170 be kept open when the file is closed. This does not work when a file name is
349 Note that calling any method (even inquiries) on a closed stream is
357 fp is closed after the suite of the with statement is complete:
415 This method has no effect if the file is already closed.
426 closed = self.closed
428 # If getting closed fails, then the object is probably
432 if closed:
494 def closed(self):
495 """closed: bool. True iff the file has been closed.
502 """Internal: raise a ValueError if file is closed
504 if self.closed:
505 raise ValueError("I/O operation on closed file."
839 if self.closed:
840 raise ValueError("flush on closed file")
844 if self.raw is not None and not self.closed:
869 def closed(self):
870 return self.raw.closed
918 if self.closed:
919 raise ValueError("__getstate__ on closed file")
925 if self.closed:
926 raise ValueError("getvalue on closed file")
932 if self.closed:
933 raise ValueError("getbuffer on closed file")
942 if self.closed:
943 raise ValueError("read from closed file")
968 if self.closed:
969 raise ValueError("write to closed file")
987 if self.closed:
988 raise ValueError("seek on closed file")
1008 if self.closed:
1009 raise ValueError("tell on closed file")
1013 if self.closed:
1014 raise ValueError("truncate on closed file")
1030 if self.closed:
1031 raise ValueError("I/O operation on closed file.")
1035 if self.closed:
1036 raise ValueError("I/O operation on closed file.")
1040 if self.closed:
1041 raise ValueError("I/O operation on closed file.")
1266 if self.closed:
1267 raise ValueError("write to closed file")
1302 if self.closed:
1303 raise ValueError("flush on closed file")
1330 if self.raw is None or self.closed:
1413 def closed(self):
1414 return self.writer.closed
1622 if self._fd >= 0 and self._closefd and not self.closed:
1634 if self.closed:
1635 return '<%s [closed]>' % class_name
1765 A closed file cannot be used for further I/O operations. close() may be
1768 if not self.closed:
1809 """True if the file descriptor will be closed by close()."""
2175 if self.closed:
2176 raise ValueError("I/O operation on closed file.")
2190 if self.buffer is not None and not self.closed:
2197 def closed(self):
2198 return self.buffer.closed
2212 if self.closed:
2213 raise ValueError("write to closed file")
2465 if self.closed:
2466 raise ValueError("tell on closed file")
2564 if self.closed:
2565 raise ValueError("read from closed file")