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

Method _reopen

tools/python-3.11.9-amd64/Lib/pkgutil.py:299–305  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

297 return file.read()
298
299 def _reopen(self):
300 if self.file and self.file.closed:
301 mod_type = self.etc[2]
302 if mod_type==imp.PY_SOURCE:
303 self.file = open(self.filename, 'r')
304 elif mod_type in (imp.PY_COMPILED, imp.C_EXTENSION):
305 self.file = open(self.filename, 'rb')
306
307 def _fix_name(self, fullname):
308 if fullname is None:

Callers 3

load_moduleMethod · 0.95
get_codeMethod · 0.95
get_sourceMethod · 0.95

Calls 1

openFunction · 0.70

Tested by

no test coverage detected