MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_file

Method get_file

Lib/mailbox.py:858–864  ·  view source on GitHub ↗

Return a file-like representation or raise a KeyError.

(self, key, from_=False)

Source from the content-addressed store, hash-verified

856 return string.replace(linesep, b'\n')
857
858 def get_file(self, key, from_=False):
859 """Return a file-like representation or raise a KeyError."""
860 start, stop = self._lookup(key)
861 self._file.seek(start)
862 if not from_:
863 self._file.readline()
864 return _PartialFile(self._file, self._file.tell(), stop)
865
866 def _install_message(self, message):
867 """Format a message and blindly write to self._file."""

Callers

nothing calls this directly

Calls 5

_PartialFileClass · 0.85
_lookupMethod · 0.45
seekMethod · 0.45
readlineMethod · 0.45
tellMethod · 0.45

Tested by

no test coverage detected