parameters: (self, basename, contents)
docstring: Generate an include file.
  
          - directory - subdirectory to put file in
          - basename - base name of the file
          - contents - contents of the file (Asciidoc boilerplate aside)
docstring_summary: Generate an include file.
docstring_tokens: Generate an include file .
function: 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)
function_tokens: 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 )