wimpy/util.py
def working_directory(path):
    """Change working directory and restore the previous on exit"""
    prev_dir = os.getcwd()
    os.chdir(str(path))
    try:
        yield
    finally:
        os.chdir(prev_dir)
def working_directory(path):
    prev_dir = os.getcwd()
    os.chdir(str(path))
    try:
        yield
    finally:
        os.chdir(prev_dir)
def working_directory ( path ) : prev_dir = os . getcwd ( ) os . chdir ( str ( path ) ) try : yield finally : os . chdir ( prev_dir )
Change working directory and restore the previous on exit
Change working directory and restore the previous on exit