#NEWLINE# def render_to_string( self , force_crlf = False ) : #NEWLINE# #INDENT# '\n        Renders a nacha file as a string\n        ' #NEWLINE# line_ending = '\n' #NEWLINE# if force_crlf : #NEWLINE# #INDENT# line_ending = '\r\n' #NEWLINE# #UNINDENT# ret_string = ( self . header . get_row ( ) + line_ending ) #NEWLINE# for batch in self . batches : #NEWLINE# #INDENT# ret_string += batch . render_to_string ( force_crlf = force_crlf ) #NEWLINE# #UNINDENT# ret_string += ( self . control . get_row ( ) + line_ending ) #NEWLINE# lines = self . get_lines ( self . batches ) #NEWLINE# nine_lines = int ( round ( ( 10 * ( math . ceil ( ( lines / 10.0 ) ) - ( batch / 10.0 ) ) ) ) ) #NEWLINE# ret_string += self . get_nines ( nine_lines , line_ending ) #NEWLINE# return ret_string