This section describes the actual code of the homelist.py
script, in literate programming style. For a definition of
literate programming, as well as the tool used to extract
the code from the document source, see A source extractor for lightweight literate
programming.
Since Python scripts have the main at the end, you may wish to jump right to Section 3.10, “ The main program ”.
The script starts out with a line to make it self-executing according to the usual Unix conventions. Next comes a brief comment pointing back to this document.
#!/usr/local/bin/python #================================================================ # homelist.py: Generate a list of user homepages. # For documentation, see: # http://www.nmt.edu/tcc/projects/homelist/
Next we document the overall intended function of the script. For more information on intended functions and the Cleanroom programming methodology, see the author's Cleanroom pages.
#---------------------------------------------------------------- # Overall intended function: # [ sys.stdout +:= an XHTML table containing a list of user # names and homepage links for all users in the TCC's LDAP # server who have a homepage ] #----------------------------------------------------------------