MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / close

Method close

tools/python-3.11.9-amd64/Lib/wave.py:562–574  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

560 self._patchheader()
561
562 def close(self):
563 try:
564 if self._file:
565 self._ensure_header_written(0)
566 if self._datalength != self._datawritten:
567 self._patchheader()
568 self._file.flush()
569 finally:
570 self._file = None
571 file = self._i_opened_the_file
572 if file:
573 self._i_opened_the_file = None
574 file.close()
575
576 #
577 # Internal methods.

Callers 2

__del__Method · 0.95
__exit__Method · 0.95

Calls 4

_patchheaderMethod · 0.95
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected