#NEWLINE# def rename_file( self , frm , to , safe = False ) : #NEWLINE# #INDENT# if os . path . exists ( self . _fpath ( to ) ) : #NEWLINE# #INDENT# if safe : #NEWLINE# #INDENT# raise NameError ( ( 'File %r exists' % to ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# os . remove ( self . _fpath ( to ) ) #NEWLINE# #UNINDENT# #UNINDENT# os . rename ( self . _fpath ( frm ) , self . _fpath ( frm ) )