MCPcopy Index your code
hub / github.com/ipython/ipython / close

Method close

IPython/utils/io.py:59–64  ·  view source on GitHub ↗

Close the file and restore the channel.

(self)

Source from the content-addressed store, hash-verified

57 self._closed = False
58
59 def close(self):
60 """Close the file and restore the channel."""
61 self.flush()
62 setattr(sys, self.channel, self.ostream)
63 self.file.close()
64 self._closed = True
65
66 def write(self, data):
67 """Write data to both channels."""

Callers 15

__del__Method · 0.95
test_tee_simpleFunction · 0.95
tchanMethod · 0.95
retar.pyFile · 0.45
cleanupMethod · 0.45
_make_wavMethod · 0.45
floadMethod · 0.45
decorators.pyFile · 0.45
default_configFunction · 0.45
__exit__Method · 0.45
__exit__Method · 0.45
make_tempfileFunction · 0.45

Calls 1

flushMethod · 0.95

Tested by 15

test_tee_simpleFunction · 0.76
tchanMethod · 0.76
test_xmode_skipFunction · 0.36
test_decorator_skipFunction · 0.36
test_where_erase_valueFunction · 0.36
test_video_embeddingFunction · 0.36
test_historyFunction · 0.36