MCPcopy Index your code
hub / github.com/python/cpython / get_data

Method get_data

Lib/importlib/_bootstrap_external.py:919–926  ·  view source on GitHub ↗

Return the data from path as raw bytes.

(self, path)

Source from the content-addressed store, hash-verified

917 return self.path
918
919 def get_data(self, path):
920 """Return the data from path as raw bytes."""
921 if isinstance(self, (SourceLoader, SourcelessFileLoader, ExtensionFileLoader)):
922 with _io.open_code(str(path)) as file:
923 return file.read()
924 else:
925 with _io.FileIO(path, 'r') as file:
926 return file.read()
927
928 @_check_name
929 def get_resource_reader(self, module):

Callers 1

get_codeMethod · 0.45

Calls 2

strFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected