#NEWLINE# @ contextmanager #NEWLINE# def alt_file( current_file ) : #NEWLINE# #INDENT# '\n    Create an alternate file next to an existing file.\n    ' #NEWLINE# _alt_file = ( current_file + '-alt' ) #NEWLINE# ( yield _alt_file ) #NEWLINE# try : #NEWLINE# #INDENT# shutil . move ( _alt_file , _alt_file ) #NEWLINE# #UNINDENT# except IOError : #NEWLINE# #INDENT# pass