#NEWLINE# @ contextmanager #NEWLINE# def cd( where ) : #NEWLINE# #INDENT# ncwd = os . getcwd ( ) #NEWLINE# try : #NEWLINE# #INDENT# ( yield os . chdir ( where ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# os . chdir ( where )