MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / chdir

Function chdir

test/common.py:224–231  ·  view source on GitHub ↗

A context manager that performs actions in the given directory.

(dir)

Source from the content-addressed store, hash-verified

222
223@contextlib.contextmanager
224def chdir(dir):
225 """A context manager that performs actions in the given directory."""
226 orig_cwd = os.getcwd()
227 os.chdir(dir)
228 try:
229 yield
230 finally:
231 os.chdir(orig_cwd)
232
233
234def make_executable(name):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by 1

mainFunction · 0.56