#NEWLINE# def __str__( self ) : #NEWLINE# #INDENT# s = '' #NEWLINE# if ( ( len ( self . sections ) == 1 ) and ( self . sections [ 0 ] . c_header != None ) ) : #NEWLINE# #INDENT# for name in self . first_half : #NEWLINE# #INDENT# header = getattr ( self , ( name + '_header' ) ) #NEWLINE# if ( header != None ) : #NEWLINE# #INDENT# s += ( '%s=%s\r\n' % ( name , str ( header ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# s += ( 'c=%s\r\n' % str ( self . sections [ 0 ] . c_header ) ) #NEWLINE# for name in self . second_half : #NEWLINE# #INDENT# header = getattr ( self , ( name + '_header' ) ) #NEWLINE# if ( header != None ) : #NEWLINE# #INDENT# s += ( '%s=%s\r\n' % ( name , str ( header ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# for header in self . a_headers : #NEWLINE# #INDENT# s += ( 'a=%s\r\n' % str ( header ) ) #NEWLINE# #UNINDENT# s += self . sections [ 0 ] . localStr ( noC = True ) #NEWLINE# return s #NEWLINE# #UNINDENT# optimize_c_headers = False #NEWLINE# if ( ( len ( self . sections ) > 1 ) and ( self . c_header == None ) and ( self . sections [ 0 ] . c_header != None ) and ( str ( self . sections [ 0 ] . c_header ) == str ( self . sections [ 1 ] . c_header ) ) ) : #NEWLINE# #INDENT# optimize_c_headers = True #NEWLINE# sections_0_str = str ( self . sections [ 0 ] . c_header ) #NEWLINE# #UNINDENT# if optimize_c_headers : #NEWLINE# #INDENT# for name in self . first_half : #NEWLINE# #INDENT# header = getattr ( self , ( name + '_header' ) ) #NEWLINE# if ( header != None ) : #NEWLINE# #INDENT# s += ( '%s=%s\r\n' % ( name , str ( header ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# s += ( 'c=%s\r\n' % sections_0_str ) #NEWLINE# for name in self . second_half : #NEWLINE# #INDENT# header = getattr ( self , ( name + '_header' ) ) #NEWLINE# if ( header != None ) : #NEWLINE# #INDENT# s += ( '%s=%s\r\n' % ( name , str ( header ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for name in self . all_headers : #NEWLINE# #INDENT# header = getattr ( self , ( name + '_header' ) ) #NEWLINE# if ( header != None ) : #NEWLINE# #INDENT# s += ( '%s=%s\r\n' % ( name , str ( header ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# for header in self . a_headers : #NEWLINE# #INDENT# s += ( 'a=%s\r\n' % str ( header ) ) #NEWLINE# #UNINDENT# for section in self . sections : #NEWLINE# #INDENT# if ( optimize_c_headers and ( section . c_header != None ) and ( str ( section . c_header ) == sections_0_str ) ) : #NEWLINE# #INDENT# s += section . localStr ( noC = True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# s += str ( section ) #NEWLINE# #UNINDENT# #UNINDENT# return s