def writeContentsLine(hypertextFile, output):
 summarizedFileName = hypertextFile[:hypertextFile.rfind('.')]
 numberOfDots = summarizedFileName.count('.')
 prefixSpaces = ('&nbsp;&nbsp;' * numberOfDots)
 if (numberOfDots > 0):
  summarizedFileName = summarizedFileName[(summarizedFileName.rfind('.') + 1):]
 capitalizedSummarizedFileName = settings.getEachWordCapitalized(summarizedFileName)
 output.write(('%s<a href="%s">%s</a><br>\n' % (prefixSpaces, hypertextFile, capitalizedSummarizedFileName)))

def writeContentsLine ( hypertextFile , output ) : summarizedFileName = hypertextFile [ : hypertextFile . rfind ( '.' ) ] numberOfDots = summarizedFileName . count ( '.' ) prefixSpaces = ( '&nbsp;&nbsp;' * numberOfDots ) if ( numberOfDots > 0 ) : summarizedFileName = summarizedFileName [ ( summarizedFileName . rfind ( '.' ) + 1 ) : ] capitalizedSummarizedFileName = settings . getEachWordCapitalized ( summarizedFileName ) output . write ( ( '%s<a href="%s">%s</a><br>\n' % ( prefixSpaces , hypertextFile , capitalizedSummarizedFileName ) ) )
write a line of the contents file .