#NEWLINE# def _format_long_image( self ) : #NEWLINE# #INDENT# '\n        Break up long string value/comment into ``CONTINUE`` cards.\n        This is a primitive implementation: it will put the value\n        string in one block and the comment string in another.  Also,\n        it does not break at the blank space between words.  So it may\n        not look pretty.\n        ' #NEWLINE# if ( self . keyword in Card . _commentary_keywords ) : #NEWLINE# #INDENT# return self . _format_long_commentary_image ( ) #NEWLINE# #UNINDENT# value_length = 67 #NEWLINE# comment_length = 64 #NEWLINE# output = [ ] #NEWLINE# value = self . _value . replace ( "'" , "''" ) #NEWLINE# words = _words_group ( value , value_length ) #NEWLINE# for ( idx , word ) in enumerate ( words ) : #NEWLINE# #INDENT# if ( idx == 0 ) : #NEWLINE# #INDENT# headstr = ( '%-*s= ' % ( KEYWORD_LENGTH , self . keyword ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# headstr = 'CONTINUE  ' #NEWLINE# #UNINDENT# if ( ( not self . comment ) and ( idx == ( len ( words ) - 1 ) ) ) : #NEWLINE# #INDENT# value_format = "'%-s'" #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# value_format = "'%-s&'" #NEWLINE# #UNINDENT# value = ( value_format % word ) #NEWLINE# output . append ( ( '%-80s' % ( headstr + value ) ) ) #NEWLINE# #UNINDENT# comment_format = '%-s' #NEWLINE# if self . comment : #NEWLINE# #INDENT# words = _words_group ( self . comment , comment_length ) #NEWLINE# for ( idx , word ) in enumerate ( words ) : #NEWLINE# #INDENT# if ( output == ( len ( words ) - 1 ) ) : #NEWLINE# #INDENT# headstr = "CONTINUE  '' / " #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# headstr = "CONTINUE  '&' / " #NEWLINE# #UNINDENT# comment = ( headstr + ( comment_format % word ) ) #NEWLINE# output . append ( ( '%-80s' % comment ) ) #NEWLINE# #UNINDENT# #UNINDENT# return '' . join ( output )