I've a little Python script for turning a simple text files (with a few bits of markup) into nice PDF files tuned for reading, with ReportLab. Seeing how much I'm now relying on the word counting I taught it to do, yesterday I decided to throw in support for some readability statistics. Odd thing is that even having sorted out the integer division issue* it still returns slightly different values for the Flesch-Kincaid reading ease and grade level to the checker in Microsoft Word.

* Note to designers of programming languages: integer division should really be a different operator to the normal, useful kind. In the rare event that I need it I can look it up (in fact, why have it at all? I'd much rather round the operands or the result myself). To have to cast my floats just because they happen to have int values is just crazy.