Next / Previous / Contents / Shipman's homepage

6. listext2: Prologue

Here begins the actual code of the listext2 script. This is an example of lightweight literate programming. This script was written using the Cleanroom software design methodology; the comments inside [ square brackets ] are Cleanroom intended functions that specify the semantics of each code block.

The code starts with a “pound-bang line” that makes the script self-executing on Unix systems, followed by a comment referring back to this documentation.

#!/usr/bin/env python
# listext2: Text file listing generator.  For documentation: