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

Method __enter__

tools/python-3.11.9-amd64/Lib/contextlib.py:786–788  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

784 self._old_cwd = []
785
786 def __enter__(self):
787 self._old_cwd.append(os.getcwd())
788 os.chdir(self.path)
789
790 def __exit__(self, *excinfo):
791 os.chdir(self._old_cwd.pop())

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
chdirMethod · 0.45

Tested by

no test coverage detected