@contextlib.contextmanager
def pushd(directory):
    prevdir = os.getcwd()
    os.chdir(directory)
    try:
        yield prevdir
    finally:
        os.chdir(prevdir)
Sets the traditional log trace spec.
dataset/ETHPy150Open mathcamp/pypicloud/git_hooks/hook.py/pushd--crossover with--dataset/ETHPy150Open wsadminlib/wsadminlib/tests/wsadminlib.test.py/testLogTrace