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

Function cwd

Platforms/Apple/__main__.py:243–248  ·  view source on GitHub ↗

A context manager that sets the current working directory.

(subdir: Path)

Source from the content-addressed store, hash-verified

241
242@contextmanager
243def cwd(subdir: Path):
244 """A context manager that sets the current working directory."""
245 orig = os.getcwd()
246 os.chdir(subdir)
247 yield
248 os.chdir(orig)
249
250
251def configure_build_python(context: argparse.Namespace) -> None:

Callers 4

configure_build_pythonFunction · 0.85
make_build_pythonFunction · 0.85
configure_host_pythonFunction · 0.85
make_host_pythonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected