(self, basename, contents)
Generate an include file.

        - directory - subdirectory to put file in
        - basename - base name of the file
        - contents - contents of the file (Asciidoc boilerplate aside)
Generate an include file.
Generate an include file .
def writeBlock(self, basename, contents):
        """Generate an include file.

        - directory - subdirectory to put file in
        - basename - base name of the file
        - contents - contents of the file (Asciidoc boilerplate aside)"""

        filename = self.genOpts.directory + '/' + basename
        self.logMsg('diag', '# Generating include file:', filename)
        with open(filename, 'w', encoding='utf-8') as fp:
            write(self.genOpts.conventions.warning_comment, file=fp)

            if len(contents) > 0:
                for str in contents:
                    write(str, file=fp)
            else:
                self.logMsg('diag', '# No contents for:', filename)
def writeBlock ( self , basename , contents ) : filename = self . genOpts . directory + '/' + basename self . logMsg ( 'diag' , '# Generating include file:' , filename ) with open ( filename , 'w' , encoding = 'utf-8' ) as fp : write ( self . genOpts . conventions . warning_comment , file = fp ) if len ( contents ) > 0 : for str in contents : write ( str , file = fp ) else : self . logMsg ( 'diag' , '# No contents for:' , filename )