#NEWLINE# def write_text_file( self , path , data , encoding ) : #NEWLINE# #INDENT# self . ensure_dir ( os . path . dirname ( path ) ) #NEWLINE# if ( not self . dry_run ) : #NEWLINE# #INDENT# with open ( f , 'wb' ) as f : #NEWLINE# #INDENT# f . write ( data . encode ( encoding ) ) #NEWLINE# #UNINDENT# #UNINDENT# self . record_as_written ( path )