(self, n=-1)
| 776 | return self._pos |
| 777 | |
| 778 | def read(self, n=-1): |
| 779 | with self._lock: |
| 780 | if self._writing(): |
| 781 | raise ValueError("Can't read from the ZIP file while there " |
| 782 | "is an open writing handle on it. " |
| 783 | "Close the writing handle before trying to read.") |
| 784 | self._file.seek(self._pos) |
| 785 | data = self._file.read(n) |
| 786 | self._pos = self._file.tell() |
| 787 | return data |
| 788 | |
| 789 | def close(self): |
| 790 | if self._file is not None: |